gocrypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CryptoData = make(map[int]CryptoAlgo)

Functions

func AesDecrypt added in v1.0.0

func AesDecrypt(ciphertext []byte, key []byte, iv []byte, mode string) ([]byte, error)

func AesGcmDecrypt added in v1.0.0

func AesGcmDecrypt(key []byte, ciphertext []byte, nonce []byte) ([]byte, error)

func AesUnwrapKey added in v1.0.0

func AesUnwrapKey(key, cipherText []byte) []byte

func DataDecrypt

func DataDecrypt(cipherAlgo CryptoAlgo, hashName string, raw, encKey, iv []byte, rounds int) []byte

Internal use. Decrypts data stored in DPAPI structures.

func DerivePwdHash

func DerivePwdHash(pwdHash []byte, userSID string, digest string) []byte

Internal use. Computes the encryption key from a user's password hash.

func InitCryptoAlgo

func InitCryptoAlgo() map[int]CryptoAlgo

func ModuleDecrypt

func ModuleDecrypt(ciphertext []byte, key []byte, module string, mode string, iv []byte) []byte

Types

type CryptoAlgo

type CryptoAlgo struct {
	Name         string
	Module       string
	KeyLength    int
	IvLength     int
	BlockSize    int
	DigestLength int
}

func GetAlgo

func GetAlgo(algNum int) CryptoAlgo

Jump to

Keyboard shortcuts

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