Documentation ¶
Index ¶
- Constants
- Variables
- func ReadFileContentAndHash(algo Algorithms, path string) ([]byte, error)
- func ReadFileContentAndHmac(algo Algorithms, path string) ([]byte, error)
- type Algorithms
- type Argon2ID
- type Blake2b256
- type Blake2b384
- type Blake2b512
- type Hkdf
- type Kdf
- type Parameters
- type Sha3256
- type Sha3384
- type Sha3512
- type Shake128
- type Shake256
Constants ¶
Variables ¶
View Source
var ErrHmacSecretNil = errors.New("HMAC secret is nil")
Functions ¶
func ReadFileContentAndHash ¶
func ReadFileContentAndHash(algo Algorithms, path string) ([]byte, error)
func ReadFileContentAndHmac ¶
func ReadFileContentAndHmac(algo Algorithms, path string) ([]byte, error)
Types ¶
type Algorithms ¶
type Argon2ID ¶
type Argon2ID struct { Salt []byte Memory uint32 Iterations uint32 Parallelism uint8 KeyLen uint32 }
func (*Argon2ID) ExtractParameters ¶
func (a *Argon2ID) ExtractParameters(input string) (Parameters, error)
type Blake2b256 ¶
type Blake2b256 struct {
HmacSecret []byte
}
func (*Blake2b256) ValidateHash ¶
func (b *Blake2b256) ValidateHash(plaintext, expectedHash []byte) (bool, error)
func (*Blake2b256) ValidateHmac ¶
func (b *Blake2b256) ValidateHmac(data, expectedHash []byte) (bool, error)
type Blake2b384 ¶
type Blake2b384 struct {
HmacSecret []byte
}
func (*Blake2b384) ValidateHash ¶
func (b *Blake2b384) ValidateHash(plaintext, expectedHash []byte) (bool, error)
func (*Blake2b384) ValidateHmac ¶
func (b *Blake2b384) ValidateHmac(data, expectedHash []byte) (bool, error)
type Blake2b512 ¶
type Blake2b512 struct {
HmacSecret []byte
}
func (*Blake2b512) ValidateHash ¶
func (b *Blake2b512) ValidateHash(plaintext, expectedHash []byte) (bool, error)
func (*Blake2b512) ValidateHmac ¶
func (b *Blake2b512) ValidateHmac(data, expectedHash []byte) (bool, error)
type Parameters ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.