pub trait CsrfCipher: Send + Sync + 'static {
    fn verify(&self, token: &[u8], secret: &[u8]) -> bool;
    fn generate(&self) -> (Vec<u8>, Vec<u8>);

    fn random_bytes(&self, len: usize) -> Vec<u8>  { ... }
}
Expand description

Generate secret and token and valid token.

Required Methods§

Verify token is valid.

Generate new secret and token.

Provided Methods§

Generate a random bytes.

Implementors§