pub trait Algorithm {
type Drop: DropStrategy<Extra = Self::Extra>;
type Extra;
}Expand description
A trait that defines an encryption algorithm and its associated types.
This trait is implemented by algorithm types (like xor::Xor
and rc4::Rc4) to specify:
- The drop strategy to use when the encrypted data is dropped
- The extra data type that the algorithm needs to store alongside the buffer
The Extra associated type allows algorithms to store additional data
(like encryption keys for RC4) within the Encrypted struct.
Required Associated Types§
Sourcetype Drop: DropStrategy<Extra = Self::Extra>
type Drop: DropStrategy<Extra = Self::Extra>
The drop strategy to use when the encrypted data is dropped.