aboutsummaryrefslogtreecommitdiff
path: root/pbkdf.go
blob: 6a88fc1db0335c567236bf5fd00dc19e6a8d5867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import (
	"hash"

	"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)
}