mvo5 / sha512crypt-node Goto Github PK
View Code? Open in Web Editor NEWA nodejs implementation of the sha512crypt hash algorithm
License: BSD 2-Clause "Simplified" License
A nodejs implementation of the sha512crypt hash algorithm
License: BSD 2-Clause "Simplified" License
Hi.
This implements the sha512crypt algorithm as described in http://www.akkadia.org/drepper/SHA-crypt.txt in pure javascript.
Wrong link, I guess that should be
https://github.com/mvo5/sha512crypt-node/blob/master/lib/sha512.js
The other link:
http://www.akkadia.org/drepper/SHA-crypt.txt
Is in C language.
Great module but I can't see mention of a license?
Could you add a license file to the project? There is a "license" property in package.json but it's marked as unlicensed here: https://www.npmjs.com/package/sha512crypt-node. I believe npmjs.com try to find the license in a separate file or as a part of README.MD.
It seems pulling from NPMJS gives an out of date version to what is in the repository. Are there plans to update NPMJS to the latest or is there another repo it is under?
Can this piece of javascript be sourced on a web page whitout nodejs, thus having a browser generate a hash, provided a password and a salt? just like the python example?
If I hash asfd£
with salt $6$a7a5dc2fa314dda0
using this library I get:
$6$a7a5dc2fa314dda0$QWeHb0gFesNAVmsvX63.q5wbsV6./f7fmpF.DpqhTWzTQBO08koP65eqCOyTSMw4o8mnawc2hAtUf6f.P6VLb1
I can't login on a unix machine with the above hash. I try to gen the same thing using python and I get:
$ python -c 'import crypt; print crypt.crypt("asdf£", "$6$a7a5dc2fa314dda0")'
$6$a7a5dc2fa314dda0$E1GTcgT52oJFvhETaKwBk26Gy0GIzNQu2Mv4.UZwXp00CQi/8vC3IQKcrmpqbUaM2jFMOcDoShcxo1Mrt/Z5k/
If I take the £ out then the hashes are the same.
I've looked at the implementation and I can't see where the issue may lie.
https://github.com/mvo5/sha512crypt-node/blob/master/sha512crypt.js#L38-L42
The codes are going to throw in my Angular 13 project, adding the following should fix it.
var rstr_sha512;
var binb_sha512;
var hex_sha512;
var rstr2hex;
var rstr2b64;
Hi.
You should gave the install repository for npm
I tried
npm install sha512crypt-node
But doesn't exists.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.