Documentation ¶
Index ¶
- type BaseHasherIdentifiers
- type HasherManager
- func (h *HasherManager) Hash(toHash []byte, version HasherVersion) (hash []byte, salt []byte, err error)
- func (h *HasherManager) HashB64(toHash []byte, version HasherVersion) (hash, salt string, err error)
- func (h *HasherManager) Id() string
- func (h *HasherManager) Verify(hash, salt, input []byte, version HasherVersion) (bool, error)
- func (h *HasherManager) VerifyB64(hash, salt string, input []byte, version HasherVersion) (bool, error)
- type HasherVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseHasherIdentifiers ¶
type BaseHasherIdentifiers int
/ The type to Identify the Basic Hasher Identifiers
const ( HasherBase BaseHasherIdentifiers = iota HasherMD5 HasherSHA256 HasherSHA512 HasherPBKDFSHA512 HasherFastest = HasherBase HasherStrongest = HasherPBKDFSHA512 )
func (BaseHasherIdentifiers) DoHash ¶
func (b BaseHasherIdentifiers) DoHash(toHash, salt []byte) []byte
func (BaseHasherIdentifiers) GetMagicTag ¶
func (b BaseHasherIdentifiers) GetMagicTag() [4]byte
func (BaseHasherIdentifiers) GetSaltLen ¶
func (b BaseHasherIdentifiers) GetSaltLen(_ []byte) int
type HasherManager ¶
type HasherManager struct { managers.BaseManager UserHashers map[[4]byte]HasherVersion // contains filtered or unexported fields }
func (*HasherManager) Hash ¶
func (h *HasherManager) Hash(toHash []byte, version HasherVersion) (hash []byte, salt []byte, err error)
func (*HasherManager) HashB64 ¶
func (h *HasherManager) HashB64(toHash []byte, version HasherVersion) (hash, salt string, err error)
func (*HasherManager) Id ¶
func (h *HasherManager) Id() string
func (*HasherManager) Verify ¶
func (h *HasherManager) Verify(hash, salt, input []byte, version HasherVersion) (bool, error)
func (*HasherManager) VerifyB64 ¶
func (h *HasherManager) VerifyB64(hash, salt string, input []byte, version HasherVersion) (bool, error)
Click to show internal directories.
Click to hide internal directories.