Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("the encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
Types ¶
type Algorithm ¶
type Algorithm interface { Generator BidirectionalComparer }
type Argon2Comparer ¶
type Argon2Comparer struct{}
func NewArgon2Comparer ¶
func NewArgon2Comparer() (*Argon2Comparer, error)
NewArgon2Comparer returns a new Argon2Comparer.
func (*Argon2Comparer) Compare ¶
func (a *Argon2Comparer) Compare(plaintext, hashed string) (bool, error)
func (*Argon2Comparer) CompareBidirectional ¶
func (a *Argon2Comparer) CompareBidirectional(str1, str2 string) (bool, error)
type Argon2Generator ¶
type Argon2Generator struct {
// contains filtered or unexported fields
}
func NewArgon2Generator ¶
type BcryptComparer ¶
type BcryptComparer struct{}
func NewBcryptComparer ¶
func NewBcryptComparer() (*BcryptComparer, error)
func (*BcryptComparer) Compare ¶
func (b *BcryptComparer) Compare(plaintext, hashed string) (bool, error)
func (*BcryptComparer) CompareBidirectional ¶
func (b *BcryptComparer) CompareBidirectional(plaintext, hashed string) (bool, error)
type BcryptGenerator ¶
type BcryptGenerator struct {
// contains filtered or unexported fields
}
func NewBcryptGenerator ¶
func NewBcryptGenerator(cost int) (*BcryptGenerator, error)
type BidirectionalComparer ¶
Click to show internal directories.
Click to hide internal directories.