std/cipher/error

std/cipher/src/error.trb

CipherError: why a key or a nonce is not one, and why sealed bytes do not open.

type CipherError

type CipherError with Show, Error

Why a key or a nonce has the wrong size, or why bytes do not open. CipherError.Forged says nothing of where the bytes differ from what was sealed: a caller that told the sender more would hand a forger an oracle.

case WrongLength

case WrongLength(what: String, expected: Int, found: Int)

what has expected bytes, and found were given.

case Forged

case Forged

The tag does not match the nonce, the associated data and the ciphertext under this key, or there is no tag.

fn show

fn show(): String

One line: what was expected, and what was there instead.