mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-26 21:53:48 +01:00
25 lines
781 B
Rust
25 lines
781 B
Rust
mod server;
|
|
pub use server::FabFire;
|
|
|
|
use rsasl::mechname::Mechname;
|
|
use rsasl::registry::{Mechanism, Side, MECHANISMS};
|
|
|
|
const MECHNAME: &'static Mechname = &Mechname::const_new_unchecked(b"X-FABFIRE");
|
|
|
|
#[linkme::distributed_slice(MECHANISMS)]
|
|
pub static FABFIRE: Mechanism =
|
|
Mechanism::build(MECHNAME, 300, None, Some(FabFire::new_server), Side::Client);
|
|
|
|
use rsasl::property::SizedProperty;
|
|
use std::marker::PhantomData;
|
|
|
|
// All Property types must implement Debug.
|
|
#[derive(Debug)]
|
|
// The `PhantomData` in the constructor is only used so external crates can't construct this type.
|
|
pub struct FabFireCardKey(PhantomData<()>);
|
|
|
|
impl SizedProperty<'_> for FabFireCardKey {
|
|
type Value = [u8; 16];
|
|
const DESCRIPTION: &'static str = "A AES128 key for a FabFire card";
|
|
}
|