Expand description
Implements low-level cryptographic primitives, such as SimpleStreamCipher, SimpleDigest and SimpleMac.
Structs§
- EthDigest
- Computation wrapper for a digest that’s compatible with Ethereum digests.
Use
new
,update
andfinalize
triplet to produce hash of arbitrary data. Currently this instance is using Keccak256. - Simple
Digest - Simple digest computation wrapper.
Use
new
,update
andfinalize
triplet to produce hash of arbitrary data. Currently this instance is using Blake2s256. - Simple
Mac - Simple Message Authentication Code (MAC) computation wrapper
Use
new
,update
andfinalize
triplet to produce MAC of arbitrary data. Currently instantiated using Blake2s256 MAC. - Simple
Stream Cipher - Simple stream cipher wrapper
Use
new
andapply
(orapply_copy
) to XOR the keystream on the plaintext or ciphertext. Currently this instance is using ChaCha20.
Traits§
- Digest
Like - Generalization of digest-like operation (MAC, Digest,…)
Defines the
update
andfinalize
operations to produce digest value of arbitrary data.
Type Aliases§
- Secret
Key - Represents a secret key of fixed length. The value is auto-zeroized on drop.