#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Algorithm {
Rsa,
P256,
P384,
P521,
Secp256k1,
Ed25519,
Ed448,
X25519,
X448,
Sm2,
DhModp,
MlDsa44,
MlDsa65,
MlDsa87,
SlhDsa,
Falcon512,
Falcon1024,
Xmss,
XmssMt,
Lms,
Hss,
MlKem512,
MlKem768,
MlKem1024,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Operation {
Sign,
Verify,
Decrypt,
Encrypt,
Agree,
}
impl core::fmt::Display for Operation {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let s = match self {
Operation::Sign => "sign",
Operation::Verify => "verify",
Operation::Decrypt => "decrypt",
Operation::Encrypt => "encrypt",
Operation::Agree => "key-agreement",
};
f.write_str(s)
}
}