pub struct CsrfToken(_);
Expand description
Value used for CSRF protection
via the state
parameter.
Implementations§
source§impl CsrfToken
impl CsrfToken
sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Generate a new random, base64-encoded 128-bit CSRF token.
sourcepub fn new_random_len(num_bytes: u32) -> Self
pub fn new_random_len(num_bytes: u32) -> Self
Generate a new random, base64-encoded CSRF token of the specified length.
Arguments
num_bytes
- Number of random bytes to generate, prior to base64-encoding.