Documentation ¶
Overview ¶
Package noop is a no operation encryption algorithm for use when the message is intended to be publically readable.
Noop implements the Encrypt and Decrypt interfaces to ensure that is is compatible with Mailchain protocol. It does not perform any encryption or decryption actions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decrypter ¶
type Decrypter struct { }
Decrypter will decrypt data using AES256CBC method
func NewDecrypter ¶
func NewDecrypter() Decrypter
NewDecrypter create a new decrypter attaching the private key to it
func (Decrypter) Decrypt ¶
func (d Decrypter) Decrypt(data cipher.EncryptedContent) (cipher.PlainContent, error)
Decrypt data using recipient private key with AES in CBC mode.
type Encrypter ¶
type Encrypter struct {
// contains filtered or unexported fields
}
Encrypter will not perform any operation when encrypting the message.
No operation (noop) encrypter is used when the contents of the message and envelope are intended to readable by the public.
func NewEncrypter ¶
NewEncrypter create a new encrypter with crypto rand for reader
func (Encrypter) Encrypt ¶
func (e Encrypter) Encrypt(message cipher.PlainContent) (cipher.EncryptedContent, error)
Encrypt does not apply any encrption algortim. PlainContent will be return as EncryptedContent with the encryption method prepend as the first byte.