use cipher::{
generic_array::{ArrayLength, GenericArray},
SeekNum,
};
mod ctr128;
mod ctr32;
mod ctr64;
pub use ctr128::*;
pub use ctr32::*;
pub use ctr64::*;
pub trait CtrFlavor<B>
where
Self: Default + Clone,
B: ArrayLength<u8>,
{
type Nonce: Clone;
type Backend: SeekNum;
fn generate_block(&self, nonce: &Self::Nonce) -> GenericArray<u8, B>;
fn load(block: &GenericArray<u8, B>) -> Self::Nonce;
fn checked_add(&self, rhs: usize) -> Option<Self>;
fn increment(&mut self);
fn from_backend(v: Self::Backend) -> Self;
fn to_backend(&self) -> Self::Backend;
}