aboutsummaryrefslogtreecommitdiff
path: root/pbkdf.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-14 02:11:13 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-14 02:11:13 +0200
commitdffca582d57491e946582f2ac86e2c21ac5d6b74 (patch)
tree6d9a25e10e9aaba4f9ada0a2b95620b52e2ebba9 /pbkdf.go
parent004bf408ad7877f587b08e878a4c050ebf79cea9 (diff)
...
Diffstat (limited to 'pbkdf.go')
-rw-r--r--pbkdf.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pbkdf.go b/pbkdf.go
index 6a88fc1..9b868e4 100644
--- a/pbkdf.go
+++ b/pbkdf.go
@@ -1,15 +1,13 @@
package main
import (
- "hash"
+ "crypto/sha512"
"golang.org/x/crypto/pbkdf2"
)
// bcrypt_pbkdf
-const magic = "OxychromaticBlowfishSwatDynamite"
-
-func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte {
- return pbkdf2.Key(password, salt, iter, keyLen, h)
+func Key(password, salt []byte, iter, keyLen int) []byte {
+ return pbkdf2.Key(password, salt, iter, keyLen, sha512.New)
}