methods

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argon2

type Argon2 struct {
	NameStr string // name of the method
	DescStr string // method description

	Time    uint32 // number of passes over the memory
	Memory  uint32 // size of memory in KiB
	Threads uint8  // CPU threads to use
	KeySize uint32 // desired key size
}

func NewArgon2

func NewArgon2() *Argon2

func (*Argon2) DeriveKey

func (kg *Argon2) DeriveKey(psw string, salt []byte) ([]byte, error)

func (*Argon2) Description

func (kg *Argon2) Description() string

func (*Argon2) Name

func (kg *Argon2) Name() string

type PBKDF2

type PBKDF2 struct {
	NameStr string // name of the method
	DescStr string // method description

	Hash    func() hash.Hash // hasing function for key derivation
	Iter    int              // number of iterations
	KeySize int              // desired key size
}

func NewPBKDF2

func NewPBKDF2() *PBKDF2

func (*PBKDF2) DeriveKey

func (kg *PBKDF2) DeriveKey(psw string, salt []byte) ([]byte, error)

func (*PBKDF2) Description

func (kg *PBKDF2) Description() string

func (*PBKDF2) Name

func (kg *PBKDF2) Name() string

Jump to

Keyboard shortcuts

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