Documentation ¶
Index ¶
Constants ¶
View Source
const ( IdArgon2id = "argon2id" IdBcrypt = "bcrypt" IdPBKDF2 = "pbkdf2" )
Variables ¶
View Source
var Argon2idPHC = &PHC{ Id: IdArgon2id, Params: map[string]interface{}{ "m": 65536, "t": 3, "p": 2, }, }
View Source
var BcryptPHC = &PHC{ Id: IdBcrypt, Params: map[string]interface{}{ "r": 10, }, }
View Source
var PBKDF2PHC = &PHC{ Id: IdPBKDF2, Params: map[string]interface{}{ "t": 310_000, "h": "sha256", }, }
Functions ¶
func IsIdSupported ¶
func RandomBytes ¶
RandomBytes generate secure random bytes
func SetDefaultPHC ¶
func SetDefaultPHC(id string)
Types ¶
type PHC ¶
Password Hashing Competition
func DefaultPHC ¶
func DefaultPHC() *PHC
func ParsePHC ¶
parse PHC string https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md
type SConfiguration ¶
type SConfiguration struct {
PCHID string `yaml:"pchid"` // Password hash algorithm
}
Click to show internal directories.
Click to hide internal directories.