Documentation
¶
Index ¶
- Constants
- func DecryptCBC(src, key, iv []byte, padding string) ([]byte, error)
- func DecryptECB(src, key []byte, padding string) ([]byte, error)
- func DecryptGCM(cipherText, key, iv []byte) ([]byte, error)
- func EncryptCBC(src, key, iv []byte, padding string) ([]byte, error)
- func EncryptECB(src, key []byte, padding string) ([]byte, error)
- func EncryptGCM(plainText, key, iv []byte) ([]byte, error)
Constants ¶
View Source
const ( Pkcs5Padding = openssl.PKCS5_PADDING Pkcs7Padding = openssl.PKCS7_PADDING ZerosPadding = openssl.ZEROS_PADDING )
Variables ¶
This section is empty.
Functions ¶
func DecryptCBC ¶
DecryptCBC decrypts `cipherText` using CBC mode. Note that the key must be 16/24/32 bit length.
func DecryptECB ¶
DecryptECB decrypts `cipherText` using ECB mode.
func DecryptGCM ¶
DecryptGCM decrypts `cipherText` using GCM mode.
func EncryptCBC ¶
EncryptCBC encrypts `src` using CBC mode. Note that the key must be 16/24/32 bit length.
func EncryptECB ¶
EncryptECB encrypts `src` using ECB mode.
func EncryptGCM ¶
EncryptGCM encrypts `plainText` using GCM mode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.