crypto

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileMD5

func CalculateFileMD5(reader io.Reader) (string, error)

CalculateFileMD5 计算文件的MD5值

func DecryptAES256GCM added in v0.0.2

func DecryptAES256GCM(aesKey, associatedData, nonce, ciphertext string) (plaintext string, err error)

DecryptAES256GCM 解密 使用 AEAD_AES_256_GCM 算法进行解密

func EncryptAES256GCM added in v0.0.2

func EncryptAES256GCM(aesKey, associatedData, nonce, plaintext string) (ciphertext string, err error)

EncryptAES256GCM 加密 使用 AEAD_AES_256_GCM 算法进行加密

func GetPasswordAndSalt added in v0.0.2

func GetPasswordAndSalt(password string) (string, string, error)

GetPasswordAndSalt 获取密码和盐

func Md5

func Md5(data []byte) string

Md5 计算md5值

func Sha256 added in v0.0.2

func Sha256(str string) string

func Sha256PasswordWithSalt added in v0.0.2

func Sha256PasswordWithSalt(password string, salt string) string

Sha256PasswordWithSalt 对密码进行哈希处理

Types

This section is empty.

Jump to

Keyboard shortcuts

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