scrypt

package
v0.2.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig added in v0.0.21

func DefaultConfig() *types.Config

func NewScryptCrypto

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

NewScryptCrypto creates a new Scrypt 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 Params added in v0.0.21

type Params struct {
	N      int
	R      int
	P      int
	KeyLen int
}

Params represents parameters for Scrypt algorithm

func DefaultParams added in v0.2.14

func DefaultParams() *Params

func (*Params) String added in v0.0.21

func (p *Params) String() string

String returns the string representation of parameters

type Scrypt

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

Scrypt implements the Scrypt hashing algorithm

func (*Scrypt) Hash

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

Hash implements the hash method

func (*Scrypt) HashWithSalt

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

HashWithSalt implements the hash with salt method

func (*Scrypt) Type added in v0.2.14

func (c *Scrypt) Type() string

func (*Scrypt) Verify

func (c *Scrypt) Verify(hashed, password string) error

Verify implements the verify method

Jump to

Keyboard shortcuts

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