COSEAlgorithm

Enum COSEAlgorithm 

Source
pub enum COSEAlgorithm {
Show 63 variants INSECURE_RS1 = -65_535, RS512 = -259, RS384 = -258, RS256 = -257, ES256K = -47, HSS_LMS = -46, SHAKE256 = -45, SHA512 = -44, SHA384 = -43, RSAES_OAEP_SHA_512 = -42, RSAES_OAEP_SHA_256 = -41, RSAES_OAEP_RFC_8017_default = -40, PS512 = -39, PS384 = -38, PS256 = -37, ES512 = -36, ES384 = -35, ECDH_SS_A256KW = -34, ECDH_SS_A192KW = -33, ECDH_SS_A128KW = -32, ECDH_ES_A256KW = -31, ECDH_ES_A192KW = -30, ECDH_ES_A128KW = -29, ECDH_SS_HKDF512 = -28, ECDH_SS_HKDF256 = -27, ECDH_ES_HKDF512 = -26, ECDH_ES_HKDF256 = -25, SHAKE128 = -18, SHA512_256 = -17, SHA256 = -16, SHA256_64 = -15, SHA1 = -14, Direct_HKDF_AES256 = -13, Direct_HKDF_AES128 = -12, Direct_HKDF_SHA512 = -11, Direct_HKDF_SHA256 = -10, EDDSA = -8, ES256 = -7, Direct = -6, A256KW = -5, A192KW = -4, A128KW = -3, A128GCM = 1, A192GCM = 2, A256GCM = 3, HMAC256_64 = 4, HMAC256_256 = 5, HMAC384_384 = 6, HMAC512_512 = 7, AES_CCM_16_64_128 = 10, AES_CCM_16_64_256 = 11, AES_CCM_64_64_128 = 12, AES_CCM_64_64_256 = 13, AES_MAC_128_64 = 14, AES_MAC_256_64 = 15, ChaCha20_Poly1305 = 24, AES_MAC_128_128 = 25, AES_MAC_256_128 = 26, AES_CCM_16_128_128 = 30, AES_CCM_16_128_256 = 31, AES_CCM_64_128_128 = 32, AES_CCM_64_128_256 = 33, IV_GENERATION = 34,
}
Expand description

A COSE signature algorithm, indicating the type of key and hash type that should be used. see: https://www.iana.org/assignments/cose/cose.xhtml#table-algorithms

Variants§

§

INSECURE_RS1 = -65_535

§

RS512 = -259

§

RS384 = -258

§

RS256 = -257

§

ES256K = -47

§

HSS_LMS = -46

§

SHAKE256 = -45

§

SHA512 = -44

§

SHA384 = -43

§

RSAES_OAEP_SHA_512 = -42

§

RSAES_OAEP_SHA_256 = -41

§

RSAES_OAEP_RFC_8017_default = -40

§

PS512 = -39

§

PS384 = -38

§

PS256 = -37

§

ES512 = -36

§

ES384 = -35

§

ECDH_SS_A256KW = -34

§

ECDH_SS_A192KW = -33

§

ECDH_SS_A128KW = -32

§

ECDH_ES_A256KW = -31

§

ECDH_ES_A192KW = -30

§

ECDH_ES_A128KW = -29

§

ECDH_SS_HKDF512 = -28

§

ECDH_SS_HKDF256 = -27

§

ECDH_ES_HKDF512 = -26

§

ECDH_ES_HKDF256 = -25

§

SHAKE128 = -18

§

SHA512_256 = -17

§

SHA256 = -16

§

SHA256_64 = -15

§

SHA1 = -14

§

Direct_HKDF_AES256 = -13

§

Direct_HKDF_AES128 = -12

§

Direct_HKDF_SHA512 = -11

§

Direct_HKDF_SHA256 = -10

§

EDDSA = -8

§

ES256 = -7

§

Direct = -6

§

A256KW = -5

§

A192KW = -4

§

A128KW = -3

§

A128GCM = 1

§

A192GCM = 2

§

A256GCM = 3

§

HMAC256_64 = 4

§

HMAC256_256 = 5

§

HMAC384_384 = 6

§

HMAC512_512 = 7

§

AES_CCM_16_64_128 = 10

§

AES_CCM_16_64_256 = 11

§

AES_CCM_64_64_128 = 12

§

AES_CCM_64_64_256 = 13

§

AES_MAC_128_64 = 14

§

AES_MAC_256_64 = 15

§

ChaCha20_Poly1305 = 24

§

AES_MAC_128_128 = 25

§

AES_MAC_256_128 = 26

§

AES_CCM_16_128_128 = 30

§

AES_CCM_16_128_256 = 31

§

AES_CCM_64_128_128 = 32

§

AES_CCM_64_128_256 = 33

§

IV_GENERATION = 34

Trait Implementations§

Source§

impl Clone for COSEAlgorithm

Source§

fn clone(&self) -> COSEAlgorithm

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 COSEAlgorithm

Source§

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

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

impl<'de> Deserialize<'de> for COSEAlgorithm

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for COSEAlgorithm

Source§

fn eq(&self, other: &COSEAlgorithm) -> 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 Serialize for COSEAlgorithm

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<i64> for COSEAlgorithm

Source§

type Error = CryptoError

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

fn try_from(i: i64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for COSEAlgorithm

Source§

impl Eq for COSEAlgorithm

Source§

impl StructuralPartialEq for COSEAlgorithm

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<T> Same for T

Source§

type Output = T

Should always be Self
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, 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,