Case

Trait Case 

Source
pub trait Case {
    type P: ArrayLength + NonZero + IsGreaterOrEqual<U2, Output = B1>;
    type OutputLen: ArrayLength + NonZero;
    type CF: ValidCostFactor;
    type R: ArrayLength + NonZero;

    const PASSWORD: &'static [u8];
    const SALT: &'static [u8];
    const KNOWN_ANSWER: GenericArray<u8, Self::OutputLen>;

    // Provided method
    fn algorithm_self_test() { ... }
}
Expand description

Test case for P > 1

Required Associated Constants§

Source

const PASSWORD: &'static [u8]

The password

Source

const SALT: &'static [u8]

The salt

Source

const KNOWN_ANSWER: GenericArray<u8, Self::OutputLen>

The known answer

Required Associated Types§

Source

type P: ArrayLength + NonZero + IsGreaterOrEqual<U2, Output = B1>

The parallel width

Source

type OutputLen: ArrayLength + NonZero

The length of the output

Source

type CF: ValidCostFactor

The number of blocks

Source

type R: ArrayLength + NonZero

The number of rounds

Provided Methods§

Source

fn algorithm_self_test()

Test the algorithm implementation

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.

Implementors§

Source§

impl Case for CaseN1024R1P2

Source§

const PASSWORD: &'static [u8] = b"password"

Source§

const SALT: &'static [u8] = b"NaCl"

Source§

const KNOWN_ANSWER: GenericArray<u8, Self::OutputLen>

Source§

type OutputLen = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Source§

type CF = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>

Source§

type R = UInt<UTerm, B1>

Source§

type P = UInt<UInt<UTerm, B1>, B0>

Source§

impl Case for CaseN1024R8P16

Source§

const PASSWORD: &'static [u8] = b"password"

Source§

const SALT: &'static [u8] = b"NaCl"

Source§

const KNOWN_ANSWER: GenericArray<u8, Self::OutputLen>

Source§

type P = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

Source§

type OutputLen = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Source§

type CF = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>

Source§

type R = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

Source§

impl Case for CaseN1024R53P3

Source§

const PASSWORD: &'static [u8] = b"password"

Source§

const SALT: &'static [u8] = b"NaCl"

Source§

const KNOWN_ANSWER: GenericArray<u8, Self::OutputLen>

Source§

type P = UInt<UInt<UTerm, B1>, B1>

Source§

type OutputLen = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Source§

type CF = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>

Source§

type R = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B1>, B0>, B1>