sha

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *types.Config

func NewSHACrypto

func NewSHACrypto(hashType types.Type, config *types.Config) (interfaces.Cryptographic, error)

NewSHACrypto creates a new SHA crypto instance

func NewSha1Crypto

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

func NewSha224Crypto added in v0.3.3

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

func NewSha256Crypto

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

func NewSha3224 added in v0.3.3

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

func NewSha3256 added in v0.3.3

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

func NewSha3512 added in v0.3.3

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

func NewSha3512224 added in v0.3.3

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

func NewSha3512256 added in v0.3.3

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

func NewSha384Crypto added in v0.3.3

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

func NewSha512Crypto

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

func NewTypeSha3512 added in v0.3.3

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

Types

type ConfigValidator

type ConfigValidator struct {
}

func (ConfigValidator) Validate

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

type SHA

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

SHA implements the SHA hashing algorithm

func (*SHA) Hash

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

Hash implements the hash method

func (*SHA) HashWithSalt

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

HashWithSalt implements the hash with salt method

func (*SHA) Type

func (c *SHA) Type() string

func (*SHA) Verify

func (c *SHA) Verify(parts *types.HashParts, 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