pub trait StreamCipher {
// Required method
fn fill(&mut self, buf: &mut [u8]);
// Provided method
fn apply_keystream(&mut self, buf: &mut [u8]) { ... }
}Expand description
Common interface for stream ciphers.
Stream ciphers encrypt and decrypt by XORing keystream bytes into a mutable buffer. The same operation is used in both directions.
Required Methods§
Provided Methods§
Sourcefn apply_keystream(&mut self, buf: &mut [u8])
fn apply_keystream(&mut self, buf: &mut [u8])
Alias for Self::fill for callers that prefer this terminology.