asymmetric

package
v0.0.0-...-cd796bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptDataWithPrivateKey

func DecryptDataWithPrivateKey(data []byte) ([]byte, error)

DecryptDataWithPrivateKey decrypts the given data with the private key

func DecryptLargeMessageWithPrivateKey

func DecryptLargeMessageWithPrivateKey(message, key string) (string, error)

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

func DecryptMessageWithPrivateKey(message string) (string, error)

DecryptMessageWithPrivateKey decrypts the given base64 encoded ciphertext with the private key and returns plain text

func EncryptDataWithPublicKey

func EncryptDataWithPublicKey(data []byte) ([]byte, error)

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

func EncryptMessageWithPublicKey(message string) (string, error)

EncryptMessageWithPublicKey encrypts the given string and retuns the encrypted result base64 encoded

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL