Enum psa_crypto::types::key::Type [−][src]
pub enum Type {
}Expand description
Enumeration of key types supported.
Variants
Not a valid key type for any cryptographic operation but can be used to store arbitrary data in the key store.
HMAC key.
A secret key for derivation.
Key for a cipher, AEAD or MAC algorithm based on the AES block cipher.
Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES).
Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher.
Key for the RC4 stream cipher.
Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm.
RSA public key.
RSA key pair: both the private and public key.
Elliptic curve key pair: both the private and public key.
Fields of EccKeyPair
curve_family: EccFamilyECC curve family to use.
Elliptic curve public key.
Fields of EccPublicKey
curve_family: EccFamilyECC curve family to use.
Diffie-Hellman key pair: both the private key and public key.
Fields of DhKeyPair
group_family: DhFamilyDiffie-Hellman group family to use.
Diffie-Hellman public key.
Fields of DhPublicKey
group_family: DhFamilyDiffie-Hellman group family to use.
Implementations
Checks if a key type is ECC key pair with any curve family inside.
Checks if a key type is ECC public key with any curve family inside.
Example
use psa_crypto::types::key::{Type, EccFamily}; assert!(Type::EccPublicKey { curve_family: EccFamily::SecpK1}.is_ecc_public_key());
Checks if a key type is RSA public key.
Checks if a key type is DH public key with any group family inside.
Checks if a key type is DH key pair with any group family inside.
Checks if a key type is an asymmetric public key type.
If key is public or key pair, returns the corresponding public key type.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Type
impl UnwindSafe for Type
Blanket Implementations
Mutably borrows from an owned value. Read more