pub enum ContentEncryptionAlgorithm {
    A128CBC_HS256,
    A192CBC_HS384,
    A256CBC_HS512,
    A128GCM,
    A192GCM,
    A256GCM,
}
Expand description

Algorithms meant for content encryption. See RFC7518#5

Variants

A128CBC_HS256

AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm enc

A192CBC_HS384

AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm enc

A256CBC_HS512

AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm enc

A128GCM

AES GCM using 128-bit key

A192GCM

AES GCM using 192-bit key This is not supported by ring.

A256GCM

AES GCM using 256-bit key

Implementations

Convenience function to generate a new random key with the required length

Encrypt some payload with the provided algorith

Decrypt some payload with the provided algorith,

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.