Documentation
¶
Index ¶
Constants ¶
View Source
const KeySize = 32 // AES-256 需要 32 字节密钥
View Source
const (
// Prefix 用于标识加密字段的前缀,方便配置文件解析
Prefix = "ENC:"
)
Variables ¶
This section is empty.
Functions ¶
func LoadOrGenerateKey ¶
LoadOrGenerateKey 尝试从指定路径加载密钥 如果文件不存在,会自动生成一个新的随机密钥并保存,权限设置为 0600
Types ¶
Click to show internal directories.
Click to hide internal directories.