encryption

package
v0.0.0-...-6af0856 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareEncryption

func CompareEncryption(value string, hash string, pepper string) (bool, error)

func ConstantTimeStringCompare

func ConstantTimeStringCompare(a, b string) bool

func GenerateDefaultEncryption

func GenerateDefaultEncryption(value string, pepper string) (string, error)

func GenerateEncryptionWithParams

func GenerateEncryptionWithParams(cryptoParams *CryptoParams) (string, error)

func GenerateSalt

func GenerateSalt(length uint32) []byte

Types

type CryptoParams

type CryptoParams struct {
	Salt       []byte
	Pepper     string
	Iterations int
	Length     int
	// contains filtered or unexported fields
}

func ParseEncryption

func ParseEncryption(value string, hash string, pepper string) (*CryptoParams, error)

type HashSalt

type HashSalt struct {
	Result string
}

Jump to

Keyboard shortcuts

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