Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("the encoded value is not in a supported format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
This section is empty.
Types ¶
type Argon2Digest ¶
Argon2Digest stores the parameters and hash digest for a password.
func New ¶
func New() *Argon2Digest
NewArgon2Digest generates an Argon2Digest struct using default params.
func NewFromBytes ¶
func NewFromBytes(raw []byte) *Argon2Digest
func NewFromEncoded ¶
func NewFromEncoded(encoded string) (*Argon2Digest, error)
func NewFromString ¶
func NewFromString(raw string) *Argon2Digest
func (*Argon2Digest) Compare ¶
func (a *Argon2Digest) Compare(raw string) bool
func (*Argon2Digest) CompareBytes ¶
func (a *Argon2Digest) CompareBytes(raw []byte) bool
func (*Argon2Digest) GenerateDigest ¶
func (a *Argon2Digest) GenerateDigest(raw []byte) error
func (*Argon2Digest) String ¶
func (a *Argon2Digest) String() string
String encodes the Argon2 hash using the standard encoded representation, as per the official CLI: https://github.com/P-H-C/phc-winner-argon2/tree/f57e61e19229e23c4445b85494dbf7c07de721cb#command-line-utility
Click to show internal directories.
Click to hide internal directories.