Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type Cipher interface { // Encrypt encrypts the raw data. The returned ciphertext is encoded and // includes the nonce (24 bytes) and the encrypted plaintext // (with possible padding, if needed). // // Prior to encrypting the plaintext, a padding will be appended if it is // shorter than the pre-defined block size passed into NewCipher. // // If the plaintext is longer than the block size, then Encrypt will return // an error. Encrypt(plainText []byte) (cipherText string, err error) // Decrypt decrypts the given encoded ciphertext and returns the plaintext. // Any padding added to the plaintext during encryption is stripped. Decrypt(cipherText string) (plainText []byte, err error) // Marshaler marshals the cryptographic information in the cypher for // sending over the wire. json.Marshaler // Unmarshaler does not transfer the internal RNG. Use NewCipherFromJSON to // properly reconstruct a cipher from JSON. json.Unmarshaler }
Cipher manages the encryption and decryption of channel messages that are inserted into or read from the database.
Click to show internal directories.
Click to hide internal directories.