KeyType

Struct KeyType 

Source
pub struct KeyType { /* private fields */ }
Expand description

Key type

Implementations§

Source§

impl KeyType

Source

pub const RSA: KeyType

RSA key

Source

pub const DSA: KeyType

DSA key

Source

pub const DH: KeyType

DH key

Source

pub const EC: KeyType

EC key

Source

pub const X9_42_DH: KeyType

X9_42_DH key

Source

pub const KEA: KeyType

KEA key

Source

pub const GENERIC_SECRET: KeyType

Generic Secret (hmac) key

Source

pub const RC2: KeyType

RC2 key

Source

pub const RC4: KeyType

RC4 key

Source

pub const DES: KeyType

DES key

Source

pub const DES2: KeyType

DES2 key

Source

pub const DES3: KeyType

DES3 secret Note that DES3 is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.

Source

pub const CAST: KeyType

CAST key

Source

pub const CAST3: KeyType

CAST3 key

Source

pub const CAST128: KeyType

CAST128 key

Source

pub const RC5: KeyType

RC5 key

Source

pub const IDEA: KeyType

IDEA key

Source

pub const SKIPJACK: KeyType

SKIPJACK key

Source

pub const BATON: KeyType

BATON key

Source

pub const JUNIPER: KeyType

JUNIPER key

Source

pub const CDMF: KeyType

CDMF key

Source

pub const AES: KeyType

AES key

Source

pub const BLOWFISH: KeyType

BLOWFISH key

Source

pub const TWOFISH: KeyType

TWOFISH key

Source

pub const SECURID: KeyType

SECURID key

Source

pub const HOTP: KeyType

HOTP key

Source

pub const ACTI: KeyType

ACTI key

Source

pub const CAMELLIA: KeyType

CAMELLIA key

Source

pub const ARIA: KeyType

ARIA key

Source

pub const MD5_HMAC: KeyType

MD5 HMAC key

Source

pub const SHA_1_HMAC: KeyType

SHA1 HMAC key

Source

pub const RIPEMD128_HMAC: KeyType

RIPEMD128 HMAC key

Source

pub const RIPEMD160_HMAC: KeyType

RIPEMD160 HMAC key

Source

pub const SHA256_HMAC: KeyType

SHA256 HMAC key

Source

pub const SHA384_HMAC: KeyType

SHA384 HMAC key

Source

pub const SHA512_HMAC: KeyType

SHA512 HMAC key

Source

pub const SHA224_HMAC: KeyType

SHA224 HMAC key

Source

pub const SEED: KeyType

SEED key

Source

pub const GOSTR3410: KeyType

GOSTR3410 key

Source

pub const GOSTR3411: KeyType

GOSTR3411 key

Source

pub const GOST28147: KeyType

GOST28147 key

Source

pub const EC_EDWARDS: KeyType

EC edwards key

Source

pub const EC_MONTGOMERY: KeyType

EC montgomery key

Source

pub const HKDF: KeyType

HKDF key

Source

pub const ML_KEM: KeyType

ML-KEM key

Source

pub const ML_DSA: KeyType

ML-DSA key

Source

pub const SLH_DSA: KeyType

SLH-DSA key

Source

pub fn new_vendor_defined(val: CK_KEY_TYPE) -> Result<KeyType>

Create vendor defined key type

§Arguments
  • val - The value of vendor defined key type
§Errors

If val is less then CKK_VENDOR_DEFINED, a Error::InvalidValue will be returned

§Examples
use cryptoki::object::KeyType;
use cryptoki_sys::CKK_VENDOR_DEFINED;

let some_key_type: KeyType =
    KeyType::new_vendor_defined(CKK_VENDOR_DEFINED | 0x14).unwrap();

Trait Implementations§

Source§

impl Clone for KeyType

Source§

fn clone(&self) -> KeyType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KeyType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for KeyType

Source§

type Target = u64

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Display for KeyType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<KeyType> for CK_KEY_TYPE

Source§

fn from(key_type: KeyType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for KeyType

Source§

fn eq(&self, other: &KeyType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u64> for KeyType

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(key_type: CK_KEY_TYPE) -> Result<Self>

Performs the conversion.
Source§

impl Copy for KeyType

Source§

impl Eq for KeyType

Source§

impl StructuralPartialEq for KeyType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.