mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
Added vendor/ dir to remove dependencies on gopkg.in (down Aug 12 2022)
This commit is contained in:
parent
f24d4d8fdb
commit
7a4560762d
913 changed files with 317350 additions and 0 deletions
15
vendor/gopkg.in/hlandau/passlib.v1/hash/pbkdf2/raw/pbkdf2.go
generated
vendored
Normal file
15
vendor/gopkg.in/hlandau/passlib.v1/hash/pbkdf2/raw/pbkdf2.go
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
package raw
|
||||
|
||||
import (
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
"hash"
|
||||
)
|
||||
|
||||
const (
|
||||
MinRounds = 1
|
||||
MaxRounds = 0x7fffffff // setting at 32-bit signed integer limit for now
|
||||
)
|
||||
|
||||
func Hash(password, salt []byte, rounds int, hf func() hash.Hash) (hash string) {
|
||||
return Base64Encode(pbkdf2.Key(password, salt, rounds, hf().Size(), hf))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue