md5

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 7 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 NewMD5Crypto

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

NewMD5Crypto creates a new MD5 crypto instance

Types

type ConfigValidator

type ConfigValidator struct {
	SaltLength int
}

func (ConfigValidator) Validate

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

type MD5

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

MD5 implements the MD5 hashing algorithm

func (*MD5) Hash

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

Hash implements the hash method

func (*MD5) HashWithSalt

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

HashWithSalt implements the hash with salt method

func (*MD5) Verify

func (c *MD5) 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