gehirninc / crypt Goto Github PK
View Code? Open in Web Editor NEWPure Go crypt(3) Implementation
License: BSD 2-Clause "Simplified" License
Pure Go crypt(3) Implementation
License: BSD 2-Clause "Simplified" License
Thanks for your contribution, now some Linux distributions (such as debian 11) use yescrypt as the default encryption by default.
Is there any plan for yescrypt method?
Thanks
package main
import (
"github.com/GehirnInc/crypt"
_ "github.com/GehirnInc/crypt/sha256_crypt"
)
func main() {
crypt.NewFromHash("$5$zt1EpbKWbqit0l8h")
}
Output:
panic: crypt: requested crypt function is unavailable
git tag v1.0.0
git push origin v1.0.0
Hi, there's a discussion here about crypt(3) support in x/crypto.
Is anyone interested in migrating this repository? I think it does make sense to be part of x/crypto.
Thanks for writing this package. It seems to be missing the DES implementation?
crypt() is the password encryption function. It is based on the Data Encryption Standard algorithm with variations intended (among other things) to discourage use of hardware implementations of a key search.
If a salt didn't have
When using https://pkg.go.dev/bytes#SplitN as part of the Decode step for Verify
call, the $<id>[$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]]
formatted string is not properly split, leading into incorrect results for Verify
See: https://play.golang.org/p/Pk8URcLJxmx
For a hash string like this, the results in a tokens array that has incorrectly combined the hash with the salt. $6$rounds=10000$mysalt$9XTP7570fxVN/uTspSrH6kRPdR4KKGzGz7.TmJjDYGrKSwZuavW/3YaLur8JX6WP75Czcxa.megIO0lKreY0R.
Thus, call at https://github.com/GehirnInc/crypt/blob/master/common/salt.go#L125 incorrectly parses the salt, leading to error in the Verification.
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.