Documentation ¶
Index ¶
- func Decrypt(algorithm Algorithm, key string, iv string, tags []string, ...) (map[string]string, error)
- func DecryptData(algorithm Algorithm, key, ciphertext, iv, tag []byte) (plaintext []byte, err error)
- func Encrypt(algorithm Algorithm, key string, args map[string]string) (string, error)
- func EncryptData(algorithm Algorithm, key, plaintext, iv []byte) (ciphertext, tag []byte, err error)
- func EncryptKey(algorithm Algorithm, key string) (string, error)
- func GenerateIv(algorithm Algorithm) []byte
- func GenerateKey(algorithm Algorithm) string
- type Algorithm
- type Encryption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptData ¶
func DecryptData(algorithm Algorithm, key, ciphertext, iv, tag []byte) (plaintext []byte, err error)
DecryptData 使用对称密钥解密明文数据
func EncryptData ¶
func EncryptData(algorithm Algorithm, key, plaintext, iv []byte) (ciphertext, tag []byte, err error)
EncryptData 使用对称密钥加密明文数据
func EncryptKey ¶
EncryptKey 使用非对称算法加密对称密钥
func GenerateIv ¶
func GenerateKey ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.