Documentation ¶
Index ¶
- func CBCDecrypt(key, ciphertext []byte) (plaintext []byte)
- func CBCEncrypt(key, plaintext []byte, rand io.Reader) (ciphertext []byte)
- func CTRDecrypt(key, ciphertext []byte) (plaintext []byte)
- func CTREncrypt(key, plaintext []byte, rand io.Reader) (ciphertext []byte)
- func CTRStream(key, iv []byte) cipher.Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CBCDecrypt ¶
CBCDecrypt decrypts the given ciphertext with AES-256 in CBC mode and returns the resulting plaintext. The supplied key must be 32 bytes long and the ciphertext must be prepended by the corresponding IV.
func CBCEncrypt ¶
CBCEncrypt encrypts the given plaintext with AES-256 in CBC mode. The supplied key must be 32 bytes long. The returned ciphertext is prepended by a randomly generated IV.
func CTRDecrypt ¶
CTRDecrypt decrypts the given ciphertext with AES-256 in CTR mode and returns the resulting plaintext. The supplied key must be 32 bytes long and the ciphertext must be prepended by the corresponding IV.
func CTREncrypt ¶
CTREncrypt encrypts the given plaintext with AES-256 in CTR mode. The supplied key must be 32 bytes long. The returned ciphertext is prepended by a randomly generated IV.
Types ¶
This section is empty.