//
pkg.gl
Category
github.com/litecodex/go-web-framework
common
utils
crypto
aes
package
0.1.6
Repository:
https://github.com/litecodex/go-web-framework.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
8
Dependents
0
Files
99 SLOC
#
Functions
DecryptGCM
DecryptGCM 解密函数,根据 Base64 密文恢复明文.
DeriveKey
DeriveKey 使用 PBKDF2 从密码和盐值派生密钥.
EncryptGCM
EncryptGCM 加密函数,自动生成盐值和 nonce.
#
Constants
KeySize
AES-256.
NonceSize
IV/Nonce 长度(字节).
PBKDF2Iter
PBKDF2 迭代次数.
SaltSize
盐值长度(字节).