pbkdf2

package
v1.0.4007 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(password, salt []byte, iter, keyLen int, p PRF) []byte

Key derives a key from the password, salt and iteration count, returning a []byte of length keylen that can be used as cryptographic key.

Types

type CmacPRF

type CmacPRF struct {
	Cipher func(key []byte) (cipher.Block, error)
}

func NewCmacPRF added in v1.0.4005

func NewCmacPRF(cip func(key []byte) (cipher.Block, error)) CmacPRF

func (CmacPRF) NewHash added in v1.0.4005

func (prf CmacPRF) NewHash(key []byte) hash.Hash

type HmacPRF

type HmacPRF struct {
	Hash func() hash.Hash
}

func NewHmacPRF added in v1.0.4005

func NewHmacPRF(h func() hash.Hash) HmacPRF

func (HmacPRF) NewHash added in v1.0.4005

func (prf HmacPRF) NewHash(key []byte) hash.Hash

type PRF

type PRF interface {
	NewHash(key []byte) hash.Hash
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL