func testAuthProvider(user interface{}) (salt, hash []byte) { hash = []byte{} salt = []byte{} switch user.(type) { default: return case string: break } if user != "user" { return } ph := pbkdf2.HashPassword(test_password) hash = ph.Hash salt = ph.Salt return }
// HashPass is provided to return a salt and string for a password. func HashPass(password string) (salt, hash []byte) { ph := pbkdf2.HashPassword(password) hash = ph.Hash salt = ph.Salt return }