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 BoxOpen(message, peersPublicKey, privateKey []byte) (response []byte, err error)
- func BoxOpenAnonymous(message, peersPublicKey, peerPrivateKey []byte) (response []byte, err error)
- func BoxSeal(message, peersPublicKey, privateKey []byte) (response []byte, err error)
- func BoxSealAnonymous(message, peersPublicKey []byte) (response []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 BoxKeyPair
- type RsaPemPrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCBCDecrypt ¶
AESCBCDecrypt -
func AESCBCEncrypt ¶
AESCBCEncrypt -
func AESDecrypt ¶
AESDecrypt - implementation for mysql AES_DECRYPT
func AESEncrypt ¶
AESEncrypt - implementation for mysql AES_ENCRYPT
func AESGCMDecrypt ¶
func AESGCMEncrypt ¶
func BoxOpenAnonymous ¶
func BoxSealAnonymous ¶
func GenerateHashKeyAESGCM ¶
GenerateHashKeyAESGCM - Generate an encryption key. 16 bytes = AES-128, 32 bytes = AES-256.
func GenerateKeyAES ¶
func GenerateKeyAESCBC ¶
Types ¶
type BoxKeyPair ¶
func GenerateBoxKeyPair ¶
func GenerateBoxKeyPair() (res *BoxKeyPair, err error)
type RsaPemPrivateKey ¶
func GenerateRsaKeyPem ¶
func GenerateRsaKeyPem(bitSize int) (res *RsaPemPrivateKey, err error)
Click to show internal directories.
Click to hide internal directories.