sha1

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

func DefaultConfig() *types.Config

func NewSHA1Crypto

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

NewSHA1Crypto creates a new SHA1 crypto instance

Types

type ConfigValidator

type ConfigValidator struct {
}

func (ConfigValidator) Validate

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

type SHA1Crypto

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

SHA1Crypto implements the SHA1 hashing algorithm

func (*SHA1Crypto) Hash

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

Hash implements the hash method

func (*SHA1Crypto) HashWithSalt

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

HashWithSalt implements the hash with salt method

func (*SHA1Crypto) Verify

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