Documentation ¶
Index ¶
- func CalculateFileMD5(reader io.Reader) (string, error)
- func DecryptAES256GCM(aesKey, associatedData, nonce, ciphertext string) (plaintext string, err error)
- func EncryptAES256GCM(aesKey, associatedData, nonce, plaintext string) (ciphertext string, err error)
- func GetPasswordAndSalt(password string) (string, string, error)
- func Md5(data []byte) string
- func Sha256(str string) string
- func Sha256PasswordWithSalt(password string, salt string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateFileMD5 ¶
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
GetPasswordAndSalt 获取密码和盐
func Sha256PasswordWithSalt ¶ added in v0.0.2
Sha256PasswordWithSalt 对密码进行哈希处理
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.