FreeBSD 12 support (NOTE: xc not yet functional)

Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
Russ Magee 2020-04-26 01:03:29 +00:00
parent 09c2408c06
commit cba36b66f1
891 changed files with 351 additions and 304834 deletions

View file

@ -1,15 +0,0 @@
package raw
import (
"golang.org/x/crypto/pbkdf2"
"hash"
)
const (
MinRounds = 1
MaxRounds = 0xffffffff // setting at 32-bit 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))
}