Documentation ¶
Index ¶
- func DecodePrivateKey(privateKey []byte) *rsa.PrivateKey
- func DecryptAESGCM(key []byte, nonce []byte, cipherData []byte) []byte
- func DecryptEncodedPrivateKey(privateKey []byte, keyPassword []byte) []byte
- func DecryptRSA(privateKey *rsa.PrivateKey, data []byte) []byte
- func EncodePrivateKey(privateKey *rsa.PrivateKey) []byte
- func EncryptAESGCM(key []byte, nonce []byte, data []byte) []byte
- func EncryptEncodedPrivateKey(privateKey []byte, keyPassword []byte) []byte
- func EncryptRSA(publicKey *rsa.PublicKey, data []byte) []byte
- func GenerateAESKey() []byte
- func GenerateNonce() []byte
- func GeneratePrivateKey(size int) *rsa.PrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePrivateKey ¶
func DecodePrivateKey(privateKey []byte) *rsa.PrivateKey
DecodePrivateKey : decode unsealed private key to rsa.PrivateKey
func DecryptAESGCM ¶
DecryptAESGCM : decrypt data using AES GCM algorithm with provided key and nonce
func DecryptEncodedPrivateKey ¶
DecryptEncodedPrivateKey : unseal PEM formatted private key with password
func DecryptRSA ¶
func DecryptRSA(privateKey *rsa.PrivateKey, data []byte) []byte
DecryptRSA : Decrypt Data with RSA private key
func EncodePrivateKey ¶
func EncodePrivateKey(privateKey *rsa.PrivateKey) []byte
EncodePrivateKey : encode unsealed private key
func EncryptAESGCM ¶
EncryptAESGCM : encrypt data using AES GCM algorithm with provided key and random nonce
func EncryptEncodedPrivateKey ¶
EncryptEncodedPrivateKey : seal PEM formatted private key with password
func EncryptRSA ¶
EncryptRSA : Encrypt Data with RSA public key
func GenerateAESKey ¶
func GenerateAESKey() []byte
GenerateAESKey : Generate 256bits in length AES key
func GeneratePrivateKey ¶
func GeneratePrivateKey(size int) *rsa.PrivateKey
GeneratePrivateKey : generate rsa private key of given size
Types ¶
This section is empty.