encryption

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadAESKeyLength = errors.New("AES key is not 32 bytes long")
View Source
var ErrBadEncryptedMessageEncoding = errors.New("encrypted message is not in base64")
View Source
var ErrUnsupportedPrivateKeyType = errors.New("decryption key is not a RSA private key")
View Source
var ErrUnsupportedPublicKeyType = errors.New("encryption key is not a RSA public key")

Functions

func AESDecrypt

func AESDecrypt(encryptedMessage string, decryptionKey string) (string, error)

func AESEncrypt

func AESEncrypt(message string, encryptionKey string) (string, error)

func RSADecrypt

func RSADecrypt(encryptedMessage string, decryptionKey string) (string, error)

func RSAEncrypt

func RSAEncrypt(message string, encryptionKey string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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