encryption

package
v0.0.0-...-5c20d4f Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(contents []byte, aesKey string) []byte

Decrypt decrypts the text file

func Encrypt

func Encrypt(fileContents []byte, aesKey string) []byte

Encrypt will encrypt the text file

func GeneratePrivateRSAKeyPair

func GeneratePrivateRSAKeyPair() (*rsa.PrivateKey, []byte)

GeneratePrivateRSAKeyPair generates a Private RSA Key and outputs pem file format bytes

func GeneratePublicRSAKey

func GeneratePublicRSAKey(publicKey *rsa.PublicKey) ([]byte, error)

GeneratePublicRSAKey generates a public RSA key

func PrivateRSADecryptAESKey

func PrivateRSADecryptAESKey(privateKey []byte, encryptedText, label []byte) (decryptedText []byte)

PrivateRSADecryptAESKey decrypts the AES key

func PublicRSAEncryptAESKey

func PublicRSAEncryptAESKey(publicKey *rsa.PublicKey, sourceText, label []byte) (encryptedText []byte)

PublicRSAEncryptAESKey encrypts the AES key

Types

This section is empty.

Jump to

Keyboard shortcuts

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