Versions in this module Expand all Collapse all v1 v1.1.0 Dec 11, 2020 Changes in this version + var DefaultParams = ScryptParams + var ErrCiphertextFormat = errors.New("Ciphertext input format not as expected") + var ErrCiphertextVer = errors.New("Nonmatched ciphertext version") + var ErrInvalidVersionUpdate = errors.New(...) + var ErrPassphraseHashMismatch = errors.New("Passphrase hash does not match supplied ciphertext") + var ErrPassphraseLength = errors.New("Passphrase must be at least MinLength") + var ErrScryptParamN = errors.New("Given Scrypt (N) cost factor out of acceptable range") + var ErrScryptParamP = errors.New("Given Scrypt (p) cost factor out of acceptable range") + var ErrScryptParamR = errors.New("Given Scrypt (r) cost factor out of acceptable range") + var ErrSecretBoxDecryptFail = errors.New("SecretBox decryption failed") + var MinLength = 8 + func Benchmark(params ScryptParams) (seconds float64, err error) + func GetHashVersion(ciphertext string) (version int, err error) + func GetMasterVersion(ciphertext string) (version int, err error) + func Hash(userpass, masterpass string, version int, ...) (pwHashOut string, err error) + func UpdateMaster(newMaster, oldMaster string, newVersion int, ciphertext string, ...) (pwHashOut string, err error) + func Verify(userpass, masterpass, ciphertext string) error + type ScryptParams struct + N int + P int + R int + func GetParams(ciphertext string) (userParams, masterParams ScryptParams, err error)