Documentation ¶
Index ¶
- Constants
- func AesCryptoKey(keyStr string, aesSize int) (key, iv []byte)
- func AesCryptoKeyWithIv(keyStr, ivStr string, aesSize int) (key, iv []byte)
- func AesDecrypt(src, dst string, key, iv []byte) error
- func AesDecryptString(src string, key, iv []byte) (dst string, err error)
- func AesEncrypt(src, dst string, key, iv []byte) (string, error)
- func AesEncryptString(src string, key, iv []byte) (dst string, err error)
- func AesEncryptV1(result string, fileName string, key, iv []byte) string
- func DefaultAesCryptoKey(keyStr string) (key, iv []byte)
Constants ¶
View Source
const ( //iv 的默认长度 IV_DEFAULT_SIZE = (1 << 4) DEFAULT_KEY_STRING = "ED938EAD32CF11EC97F80242AC110002" DEFAULT_IV_STRING = "FA91506032CF11EC97F80242AC110002" )
Variables ¶
This section is empty.
Functions ¶
func AesCryptoKey ¶
AesCryptoKey 指定长度 密钥key 长度必须为16(AES-128)、24(AES-192)、或32(AES-256)
func AesCryptoKeyWithIv ¶
AesCryptoKeyWithIv 独立key iv 密钥key 长度必须为16(AES-128)、24(AES-192)、或32(AES-256)
func AesDecryptString ¶
AesDecryptString 解密
func AesEncrypt ¶
AesEncrypt 加密 ,读取文件在加密写新文件
func AesEncryptString ¶
AesEncryptString 加密
func AesEncryptV1 ¶
AesEncryptV1 直接读取数据输出就直接加密(单文件)
func DefaultAesCryptoKey ¶
DefaultAesCryptoKey 默认16 密钥key 长度必须为16(AES-128)、24(AES-192)、或32(AES-256)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.