Struct iron_csrf::ChaCha20Poly1305CsrfProtection [] [src]

pub struct ChaCha20Poly1305CsrfProtection { /* fields omitted */ }

Uses the ChaCha20Poly1305 AEAD to provide signed, encrypted CSRF tokens and cookies.

Methods

impl ChaCha20Poly1305CsrfProtection
[src]

Using scrypt with params n=14, r=8, p=1, generate the key material used for the underlying ChaCha20Poly1305 AEAD.

Panics

This function may panic if the underlying library fails catastrophically.

Trait Implementations

impl CsrfProtection for ChaCha20Poly1305CsrfProtection
[src]

Given the decoded bytes for the CSRF token and cookie, return whether or not the token is valid. Read more

Create a CSRF token and cookie with the given TTL in seconds.