Documentation
¶
Index ¶
- func Decrypt(w io.Writer, message io.Reader, privKey *rsa.PrivateKey) error
- func DecryptKey(w io.Writer, cipher io.Reader, privKey *rsa.PrivateKey) error
- func Encrypt(w io.Writer, message io.Reader, pubKey *rsa.PublicKey) error
- func EncryptKey(w io.Writer, message io.Reader, pubKey *rsa.PublicKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decrypts the message into the io.Writer. The public key is used to decrypt the AES key of the io.Writer, which is stored at the first 256 bytes.
func DecryptKey ¶
DecryptKey takes a private key to decrypt a 256 byte long message.
func Encrypt ¶
Encrypt takes a message of a io.Reader and enrypts the data and writes all into an io.Writer. The encryption of the data uses the symetric AES algorithm. The key therefore is generated inside that function. The key is also encrypted with the public key and stored at the beginning of the io.Writer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.