Documentation
¶
Index ¶
Constants ¶
View Source
const KeySize = 32 // AES-256 需要 32 字节密钥
View Source
const (
// Prefix 用于标识加密字段的前缀,方便配置文件解析
Prefix = "ENC:"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Crypter ¶
type Crypter struct {
// contains filtered or unexported fields
}
Crypter 封装了 AES-GCM 的操作
func NewCrypter ¶
NewCrypter 创建一个新的加解密实例 key 必须是 32 字节 (AES-256)
Click to show internal directories.
Click to hide internal directories.