pbkdf2

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *types.Config

func NewPBKDF2Crypto

func NewPBKDF2Crypto(config *types.Config) (interfaces.Cryptographic, error)

NewPBKDF2Crypto creates a new PBKDF2 crypto instance

Types

type ConfigValidator

type ConfigValidator struct {
	// contains filtered or unexported fields
}

func (ConfigValidator) Validate

func (v ConfigValidator) Validate(config *types.Config) error

type PBKDF2

type PBKDF2 struct {
	// contains filtered or unexported fields
}

PBKDF2 implements the PBKDF2 hashing algorithm

func (*PBKDF2) Hash

func (c *PBKDF2) Hash(password string) (string, error)

Hash implements the hash method

func (*PBKDF2) HashWithSalt

func (c *PBKDF2) HashWithSalt(password, salt string) (string, error)

HashWithSalt implements the hash with salt method

func (*PBKDF2) Type

func (c *PBKDF2) Type() string

func (*PBKDF2) Verify

func (c *PBKDF2) Verify(parts *types.HashParts, password string) error

Verify implements the verify method

type Params

type Params struct {
	Iterations int
	KeyLength  uint32
	HashType   string
}

Params represents parameters for PBKDF2 algorithm

func DefaultParams

func DefaultParams() *Params

func (*Params) String

func (p *Params) String() string

String returns the string representation of parameters

Jump to

Keyboard shortcuts

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