Skip to main content

Module crypto

Module crypto 

Source

Functions§

random_32_bytes
random_64_bytes
Wide enough to be reduced into a uniformly random [curve25519_dalek::Scalar] or [curve25519_dalek::RistrettoPoint] without bias; see common::elgamal.
random_alphanumeric
Generates a random 22 character alphanumeric string ([a-zA-Z0-9]{22}), having > 128 bits of randomness.
random_bytes 🔒
seal
Encodes and encrypts the given obj with additional associated data (or b"" if None). Use unseal to revert.
unseal
Reverse of the seal operation.
url_seal
Like seal, but returns an urlsafe base64 encoded string. and returns it as urlsafe base64 string. Use url_unseal to revert.
url_unseal
Reverse of the url_seal operation.

Type Aliases§

SealingKey
Key used by seal and co.