logo
pub trait SeekNum: Sized {
    fn from_block_byte<T: Counter>(
        block: T,
        byte: u8,
        bs: u8
    ) -> Result<Self, OverflowError>;
fn into_block_byte<T: Counter>(
        self,
        bs: u8
    ) -> Result<(T, u8), OverflowError>; }
Expand description

Trait implemented for numeric types which can be used with the StreamCipherSeek trait.

This trait is implemented for i32, u32, u64, u128, and usize. It is not intended to be implemented in third-party crates.

Required methods

Try to get position for block number block, byte position inside block byte, and block size bs.

Try to get block number and bytes position for given block size bs.

Implementations on Foreign Types

Implementors