cbwaw 0.5.50

Auth for Ordinary
Documentation
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
#![warn(clippy::all, clippy::pedantic)]
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc)]

use argon2::Argon2;
use opaque_ke::ciphersuite::CipherSuite;

pub use chacha20poly1305::aead::OsRng;
pub use opaque_ke::ServerSetup;

#[cfg(feature = "core")]
pub mod keys;

pub mod login;
pub mod registration;

#[cfg(feature = "core")]
pub mod token;

#[cfg(feature = "core")]
mod core;
#[cfg(feature = "core")]
pub use core::Auth;

#[cfg(feature = "core")]
pub mod recovery;

#[cfg(feature = "client")]
mod client;
#[cfg(feature = "client")]
pub use client::AuthClient;

pub struct DefaultCipherSuite;

impl CipherSuite for DefaultCipherSuite {
    type OprfCs = opaque_ke::Ristretto255;
    type KeyExchange = opaque_ke::TripleDh<opaque_ke::Ristretto255, sha2::Sha512>;
    type Ksf = Argon2<'static>;
}

pub const MAX_ACCOUNT_LEN: u8 = 255;