pub struct KeyType { /* private fields */ }Expand description
Key type
Implementations§
Source§impl KeyType
impl KeyType
Sourcepub const GENERIC_SECRET: KeyType
pub const GENERIC_SECRET: KeyType
Generic Secret (hmac) key
Sourcepub const DES3: KeyType
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.
Sourcepub const SHA_1_HMAC: KeyType
pub const SHA_1_HMAC: KeyType
SHA1 HMAC key
Sourcepub const RIPEMD128_HMAC: KeyType
pub const RIPEMD128_HMAC: KeyType
RIPEMD128 HMAC key
Sourcepub const RIPEMD160_HMAC: KeyType
pub const RIPEMD160_HMAC: KeyType
RIPEMD160 HMAC key
Sourcepub const SHA256_HMAC: KeyType
pub const SHA256_HMAC: KeyType
SHA256 HMAC key
Sourcepub const SHA384_HMAC: KeyType
pub const SHA384_HMAC: KeyType
SHA384 HMAC key
Sourcepub const SHA512_HMAC: KeyType
pub const SHA512_HMAC: KeyType
SHA512 HMAC key
Sourcepub const SHA224_HMAC: KeyType
pub const SHA224_HMAC: KeyType
SHA224 HMAC key
Sourcepub const EC_EDWARDS: KeyType
pub const EC_EDWARDS: KeyType
EC edwards key
Sourcepub const EC_MONTGOMERY: KeyType
pub const EC_MONTGOMERY: KeyType
EC montgomery key
Sourcepub fn new_vendor_defined(val: CK_KEY_TYPE) -> Result<KeyType>
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 From<KeyType> for CK_KEY_TYPE
impl From<KeyType> for CK_KEY_TYPE
impl Copy for KeyType
impl Eq for KeyType
impl StructuralPartialEq for KeyType
Auto Trait Implementations§
impl Freeze for KeyType
impl RefUnwindSafe for KeyType
impl Send for KeyType
impl Sync for KeyType
impl Unpin for KeyType
impl UnwindSafe for KeyType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more