philbin 1.0.1

A pure Rust AEGIS library with SIMD and runtime CPU detection
Documentation
Uses AEGIS to [AEAD][ae] encrypt the _secret_
[`plaintext`][crate::easy::Plaintext] to a byte vector containing the _public_
ciphertext and authentication tag.

(The module name specifies the used AEGIS algorithm variant.)

[`associated_data`][crate::easy::AssociatedData] (which can be empty; see
[`AssociatedData::EMPTY`][crate::easy::AssociatedData::EMPTY]) is _public_
"additional associated data" that the sender will provide along with the
ciphertext to the receiver. This data is NOT _encrypted_, but it is
_authenticated_ along with the ciphertext during decryption.

[`key`][crate::easy::Key] is the _secret_ encryption key that MUST be randomly
generated from a cryptographically secure random number generated (CSRNG).

[`nonce`][crate::careful::Nonce] is the _public_ "number used only once" which
adds (required!) output unpredictability. This parameter is taken by-value to
make it harder to accidentally reuse the nonce.

<div class="warning">

To avoid catastrophic system compromise, the provided `nonce` must <span
style="color: red; font-weight: bold">NEVER</span> be re-used to encrypt a
different `plaintext` with the same `key`.

</div>

The _public_ authentication tag is appended to the ciphertext (a "postfix" tag).
Thus the length of the returned byte vector equals the length of the ciphertext
(which equals the length of the plaintext) plus the length of the authentication
tag.

The [authentication tag][crate::easy::AuthTag] authenticates
`associated_data` and the ciphertext bytes during decryption. Using the `Tag`
generic parameter, the caller can choose a 128 or 256 bits long authentication
tag.

# Errors

- Returns [`Error::InputBufferWrongSize`][crate::easy::Error] if the length of 
  `plaintext` plus the lengths of the nonce and authentication tag is greater 
  than `isize::MAX` (the payload [`Vec`] cannot be allocated).

[ae]: https://en.wikipedia.org/wiki/Authenticated_encryption