Enum openid::biscuit::jwa::ContentEncryptionAlgorithm [−][src]
Algorithms meant for content encryption. See RFC7518#5
Variants
AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm enc
AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm enc
AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm enc
AES GCM using 128-bit key
AES GCM using 192-bit key
This is not supported by ring
.
AES GCM using 256-bit key
Implementations
impl ContentEncryptionAlgorithm
[src]
pub fn generate_key(self) -> Result<Vec<u8, Global>, Error>
[src]
Convenience function to generate a new random key with the required length
pub fn encrypt<T>(
self,
payload: &[u8],
aad: &[u8],
key: &JWK<T>,
options: &EncryptionOptions
) -> Result<EncryptionResult, Error> where
T: Serialize + DeserializeOwned,
[src]
self,
payload: &[u8],
aad: &[u8],
key: &JWK<T>,
options: &EncryptionOptions
) -> Result<EncryptionResult, Error> where
T: Serialize + DeserializeOwned,
Encrypt some payload with the provided algorith
pub fn decrypt<T>(
self,
encrypted: &EncryptionResult,
key: &JWK<T>
) -> Result<Vec<u8, Global>, Error> where
T: Serialize + DeserializeOwned,
[src]
self,
encrypted: &EncryptionResult,
key: &JWK<T>
) -> Result<Vec<u8, Global>, Error> where
T: Serialize + DeserializeOwned,
Decrypt some payload with the provided algorith,
Trait Implementations
impl Clone for ContentEncryptionAlgorithm
[src]
pub fn clone(&self) -> ContentEncryptionAlgorithm
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ContentEncryptionAlgorithm
[src]
impl Debug for ContentEncryptionAlgorithm
[src]
impl Default for ContentEncryptionAlgorithm
[src]
pub fn default() -> ContentEncryptionAlgorithm
[src]
impl<'de> Deserialize<'de> for ContentEncryptionAlgorithm
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ContentEncryptionAlgorithm, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ContentEncryptionAlgorithm, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for ContentEncryptionAlgorithm
[src]
impl PartialEq<ContentEncryptionAlgorithm> for ContentEncryptionAlgorithm
[src]
pub fn eq(&self, other: &ContentEncryptionAlgorithm) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for ContentEncryptionAlgorithm
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for ContentEncryptionAlgorithm
[src]
impl StructuralPartialEq for ContentEncryptionAlgorithm
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContentEncryptionAlgorithm
impl Send for ContentEncryptionAlgorithm
impl Sync for ContentEncryptionAlgorithm
impl Unpin for ContentEncryptionAlgorithm
impl UnwindSafe for ContentEncryptionAlgorithm
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,