Documentation ¶
Index ¶
- func DecryptDataWithPrivateKey(data []byte) ([]byte, error)
- func DecryptLargeMessageWithPrivateKey(message, key string) (string, error)
- func DecryptMessageWithPrivateKey(message string) (string, error)
- func EncryptDataWithPublicKey(data []byte) ([]byte, error)
- func EncryptLargeMessageWithPublicKey(message string) (cipherText, cipherKey string, err error)
- func EncryptMessageWithPublicKey(message string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptDataWithPrivateKey ¶
DecryptDataWithPrivateKey decrypts the given data with the private key
func DecryptLargeMessageWithPrivateKey ¶
DecryptLargeMessageWithPrivateKey decrypts the given base64 encoded message by decrypting the base64 encoded key with the rsa private key and then using the result to decrypt the ciphertext
func DecryptMessageWithPrivateKey ¶
DecryptMessageWithPrivateKey decrypts the given base64 encoded ciphertext with the private key and returns plain text
func EncryptDataWithPublicKey ¶
EncryptDataWithPublicKey encrypts the given data with the public key
func EncryptLargeMessageWithPublicKey ¶
EncryptLargeMessageWithPublicKey encrypts the given message by randomly generating a cipher. Returns the ciphertext for the given message base64 encoded and the key
func EncryptMessageWithPublicKey ¶
EncryptMessageWithPublicKey encrypts the given string and returns the encrypted result base64 encoded
Types ¶
This section is empty.