ageT

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DecryptCache sync.Map

Functions

func AutoClearCache

func AutoClearCache(d time.Duration)

自动清除缓存

func ClearCache

func ClearCache()

清除缓存

func Decrypt

func Decrypt(cipherData []byte, key string) ([]byte, error)

解密

func DecryptFromFile

func DecryptFromFile(decryptFilePath string, key string) (data []byte, err error)

加密的文件, 加密密钥

func DecryptWithCache

func DecryptWithCache(cipherText []byte, key string, psdKey string) (string, error)

解密并写入缓存

func EncriptWithCache

func EncriptWithCache(plainText string, key string, psdKey string) ([]byte, error)

加密并写入缓存

func Encrypt

func Encrypt(data []byte, key string) ([]byte, error)

加密

func EncryptToFile

func EncryptToFile(buf []byte, encryptedFilePath string, key string) (err error)

加密的数据, 数据即将存储的位置, 加密密钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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