encryption

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AesEncryptor

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

func NewAesEncryptor

func NewAesEncryptor() *AesEncryptor

func (*AesEncryptor) GenerateIv

func (a *AesEncryptor) GenerateIv() ([]byte, error)

func (*AesEncryptor) GenerateKey

func (a *AesEncryptor) GenerateKey() ([]byte, error)

func (*AesEncryptor) GenerateKeys

func (a *AesEncryptor) GenerateKeys(count int) ([][]byte, error)

func (*AesEncryptor) GetModes

func (a *AesEncryptor) GetModes() []constants.AesMode

func (*AesEncryptor) MultiLayerDecrypt

func (a *AesEncryptor) MultiLayerDecrypt(data []byte, keys [][]byte) ([]byte, error)

func (*AesEncryptor) MultiLayerDecryptWithValidation

func (a *AesEncryptor) MultiLayerDecryptWithValidation(data []byte, keys [][]byte) ([]byte, error)

func (*AesEncryptor) MultiLayerEncrypt

func (a *AesEncryptor) MultiLayerEncrypt(data []byte, keys [][]byte) ([]byte, error)

func (*AesEncryptor) MultiLayerEncryptWithValidation

func (a *AesEncryptor) MultiLayerEncryptWithValidation(data []byte, keys [][]byte) ([]byte, error)

func (*AesEncryptor) SetModes

func (a *AesEncryptor) SetModes(modes []constants.AesMode) error

type Argon2Hasher

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

func NewArgon2Hasher

func NewArgon2Hasher() *Argon2Hasher

func (*Argon2Hasher) DeriveKey

func (a *Argon2Hasher) DeriveKey(password []byte, salt []byte, keyLength uint32) ([]byte, error)

func (*Argon2Hasher) DeriveKeyWithGeneratedSalt

func (a *Argon2Hasher) DeriveKeyWithGeneratedSalt(password []byte, keyLength uint32) ([]byte, []byte, error)

func (*Argon2Hasher) GenerateSalt

func (a *Argon2Hasher) GenerateSalt() ([]byte, error)

func (*Argon2Hasher) GetKeyLength

func (a *Argon2Hasher) GetKeyLength() int

func (*Argon2Hasher) GetParameters

func (a *Argon2Hasher) GetParameters() (uint32, uint32, uint8)

func (*Argon2Hasher) GetSaltLength

func (a *Argon2Hasher) GetSaltLength() int

func (*Argon2Hasher) Hash

func (a *Argon2Hasher) Hash(password []byte, salt []byte) ([]byte, error)

func (*Argon2Hasher) HashWithGeneratedSalt

func (a *Argon2Hasher) HashWithGeneratedSalt(password []byte) ([]byte, []byte, error)

func (*Argon2Hasher) HashWithValidation

func (a *Argon2Hasher) HashWithValidation(password []byte, salt []byte) ([]byte, error)

func (*Argon2Hasher) MultiRoundHash

func (a *Argon2Hasher) MultiRoundHash(password []byte, salt []byte, rounds int) ([]byte, error)

func (*Argon2Hasher) SetKeyLength

func (a *Argon2Hasher) SetKeyLength(length int) error

func (*Argon2Hasher) SetParameters

func (a *Argon2Hasher) SetParameters(time uint32, memory uint32, threads uint8) error

func (*Argon2Hasher) SetSaltLength

func (a *Argon2Hasher) SetSaltLength(length int) error

func (*Argon2Hasher) Verify

func (a *Argon2Hasher) Verify(password []byte, salt []byte, hash []byte) bool

type Sha512Hasher

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

func NewSha512Hasher

func NewSha512Hasher() *Sha512Hasher

func (*Sha512Hasher) Hash

func (s *Sha512Hasher) Hash(data []byte) ([]byte, error)

func (*Sha512Hasher) HashWithSalt

func (s *Sha512Hasher) HashWithSalt(data []byte, salt []byte) ([]byte, error)

func (*Sha512Hasher) HashWithSaltValidation

func (s *Sha512Hasher) HashWithSaltValidation(data []byte, salt []byte) ([]byte, error)

func (*Sha512Hasher) HashWithValidation

func (s *Sha512Hasher) HashWithValidation(data []byte) ([]byte, error)

func (*Sha512Hasher) HmacHash

func (s *Sha512Hasher) HmacHash(data []byte) ([]byte, error)

func (*Sha512Hasher) HmacHashWithSalt

func (s *Sha512Hasher) HmacHashWithSalt(data []byte, salt []byte) ([]byte, error)

func (*Sha512Hasher) HmacVerify

func (s *Sha512Hasher) HmacVerify(data []byte, hash []byte) bool

func (*Sha512Hasher) HmacVerifyWithSalt

func (s *Sha512Hasher) HmacVerifyWithSalt(data []byte, salt []byte, hash []byte) bool

func (*Sha512Hasher) MultiRoundHash

func (s *Sha512Hasher) MultiRoundHash(data []byte, rounds int) ([]byte, error)

func (*Sha512Hasher) MultiRoundHashWithSalt

func (s *Sha512Hasher) MultiRoundHashWithSalt(data []byte, salt []byte, rounds int) ([]byte, error)

func (*Sha512Hasher) Verify

func (s *Sha512Hasher) Verify(data []byte, hash []byte) bool

func (*Sha512Hasher) VerifyWithSalt

func (s *Sha512Hasher) VerifyWithSalt(data []byte, salt []byte, hash []byte) bool

Jump to

Keyboard shortcuts

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