Documentation ¶
Index ¶
- Variables
- func ArrayStringContians(s []string, searchterm string) (int, bool)
- func AssertPanic(t *testing.T, callback func(), expectPanic interface{})
- func CheckPasswordHash(password, hash string) bool
- func CheckPasswordHashWithArgon2(password, encodedHash string) (match bool, err error)
- func HashPassword(password string) (string, error)
- func HashPasswordWithArgon2(password string, params *Argon2HashingParam) (string, error)
- func JSONMapper(src interface{}, dest interface{}) error
- func NewDecoder(b64 string) *decoder
- func NewEncoder(plaintext *string) *encoder
- func RunUntil(callback func() bool, duration time.Duration)
- type Argon2HashingParam
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArgon2HashingParams = &Argon2HashingParam{
memory: 64 * 1024,
iterations: 3,
parallelism: 4,
saltLength: 16,
keyLength: 32,
}
View Source
var ErrIncompatibleVersion = errors.New("incompatible version of argon2")
View Source
var ErrInvalidHash = errors.New("the encoded hash is not in the correct format")
Functions ¶
func ArrayStringContians ¶ added in v0.1.7
func AssertPanic ¶ added in v0.0.3
func CheckPasswordHash ¶
func HashPassword ¶
func HashPasswordWithArgon2 ¶
func HashPasswordWithArgon2(password string, params *Argon2HashingParam) (string, error)
func JSONMapper ¶
func JSONMapper(src interface{}, dest interface{}) error
func NewDecoder ¶ added in v0.1.1
func NewDecoder(b64 string) *decoder
func NewEncoder ¶ added in v0.1.1
func NewEncoder(plaintext *string) *encoder
Types ¶
type Argon2HashingParam ¶
type Argon2HashingParam struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.