Skip to main content

spideroak_crypto/
block.rs

1//! Operations on blocks.
2
3#![forbid(unsafe_code)]
4
5use generic_array::{ArrayLength, GenericArray};
6
7/// Implemented by types that operate on blocks.
8///
9/// For example, block ciphers or the Merkle-Damgård
10/// construction.
11pub trait BlockSize {
12    /// The size in bytes of the block.
13    type BlockSize: ArrayLength;
14}
15
16/// A block.
17pub type Block<S> = GenericArray<u8, <S as BlockSize>::BlockSize>;