pub trait CipherTextBlock:
Default
+ Copy
+ Debug {
const BLOCK_SIZE: usize;
// Required methods
fn to_bytes(self) -> Vec<u8> ⓘ;
fn from_bytes(data: &[u8]) -> Result<Self, ParseError>;
fn default_in_place(&mut self);
}Expand description
Trait implemented by per-block ciphertext components (Left and Right
blocks). Provides a fixed serialised size and byte conversions used by
OreOutput.
Required Associated Constants§
Sourceconst BLOCK_SIZE: usize
const BLOCK_SIZE: usize
Serialised size of one block in bytes.
Required Methods§
Sourcefn from_bytes(data: &[u8]) -> Result<Self, ParseError>
fn from_bytes(data: &[u8]) -> Result<Self, ParseError>
Deserialise a block from a byte slice. Returns ParseError if the
slice is malformed or the wrong length.
Sourcefn default_in_place(&mut self)
fn default_in_place(&mut self)
Reset this block to its default value in place.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.