示例#1
0
func PBKDF2_Skein256(password, salt []byte) ([]byte, []byte) {
	if salt == nil {
		salt = Rand(8)
	}
	return salt, pbkdf2.Key(password, salt, 10000, 32, NewSkein256)
}
示例#2
0
func PBKDF2_SHA1(password, salt []byte) ([]byte, []byte) {
	if salt == nil {
		salt = Rand(8)
	}
	return salt, pbkdf2.Key(password, salt, 10000, 32, sha1.New)
}