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 string, 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 decrupt 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 ¶
func EncryptLargeMessageWithPublicKey(message string) (ciphertext string, cipherkey string, err error)
EncryptLargeMessageWithPublicKey encrypts the given message by randomly generating a cipher. Returns the ciphertext for the given message base64 encoded and the key used to encypt the message which is encrypted with the public key
func EncryptMessageWithPublicKey ¶
EncryptMessageWithPublicKey encrypts the given string and retuns the encrypted result base64 encoded
Types ¶
This section is empty.