Documentation ¶
Index ¶
- func AESCBCDecrypt(encrypted []byte, key []byte) (decrypted []byte, err error)
- func AESCBCEncrypt(src []byte, key []byte, iv []byte) (encrypted []byte, err error)
- func AESDecrypt(encrypted []byte, key []byte) (decrypted []byte, err error)
- func AESEncrypt(src []byte, key []byte) (encrypted []byte, err error)
- func AESGCMDecrypt(key []byte, plaintextBytes []byte) (plainText []byte, err error)
- func AESGCMEncrypt(key []byte, plaintextBytes []byte) (ciphertext []byte, err error)
- func GenerateHashKeyAESGCM(key []byte, ln int) (genKey []byte)
- func GenerateKeyAES(key []byte) (genKey []byte)
- func GenerateKeyAESCBC(key []byte) (genKey []byte)
- func PKcs7Pad(buf []byte, size int) ([]byte, error)
- func Pkcs7UnPad(padded []byte, size int) ([]byte, error)
- func SealBoxDecrypted(k string, data []byte) (res []byte, err error)
- func SealBoxEncrypted(k string, data []byte) (res []byte, err error)
- type RsaPemPrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCBCDecrypt ¶ added in v1.1.4
AESCBCDecrypt -
func AESCBCEncrypt ¶ added in v1.1.4
AESCBCEncrypt -
func AESDecrypt ¶ added in v1.1.3
AESDecrypt - implementation for mysql AES_DECRYPT
func AESEncrypt ¶ added in v1.1.3
AESEncrypt - implementation for mysql AES_ENCRYPT
func AESGCMDecrypt ¶ added in v1.1.9
func AESGCMEncrypt ¶ added in v1.1.9
func GenerateHashKeyAESGCM ¶ added in v1.1.9
GenerateHashKeyAESGCM - Generate an encryption key. 16 bytes = AES-128, 32 bytes = AES-256.
func GenerateKeyAES ¶ added in v1.1.3
func GenerateKeyAESCBC ¶ added in v1.1.4
Types ¶
type RsaPemPrivateKey ¶
func GenerateRsaKeyPem ¶
func GenerateRsaKeyPem(bitSize int) (res *RsaPemPrivateKey, err error)
Click to show internal directories.
Click to hide internal directories.