bcrypt

package
v0.3.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *types.Config

func NewBcryptCrypto

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

NewBcryptCrypto creates a new Bcrypt crypto instance

Types

type Bcrypt

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

Bcrypt implements the Bcrypt hashing algorithm

func (*Bcrypt) Hash

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

Hash implements the hash method

func (*Bcrypt) HashWithSalt

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

HashWithSalt implements the hash with salt method

func (*Bcrypt) Type added in v0.2.14

func (c *Bcrypt) Type() string

func (*Bcrypt) Verify

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

Verify implements the verify method

type ConfigValidator

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

func (ConfigValidator) Validate

func (v ConfigValidator) Validate(config *types.Config) interface{}

type Params added in v0.2.14

type Params struct {
	Cost int
}

func DefaultParams added in v0.2.14

func DefaultParams() Params

func (Params) String added in v0.2.14

func (p Params) String() string

Jump to

Keyboard shortcuts

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