pub struct EcdhEsA128KWEncryptionKey { /* private fields */ }Expand description
P-256 public key for ECDH-ES+A128KW encryption.
Implementations§
Source§impl EcdhEsA128KWEncryptionKey
impl EcdhEsA128KWEncryptionKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Create from SEC1-encoded bytes (compressed or uncompressed).
Sourcepub fn with_key_id(self, key_id: impl Into<String>) -> Self
pub fn with_key_id(self, key_id: impl Into<String>) -> Self
Set the key ID.
Sourcepub fn encrypt<CustomClaims: Serialize>(
&self,
claims: JWTClaims<CustomClaims>,
) -> Result<String, Error>
pub fn encrypt<CustomClaims: Serialize>( &self, claims: JWTClaims<CustomClaims>, ) -> Result<String, Error>
Encrypt claims into a JWE token.
Sourcepub fn encrypt_with_options<CustomClaims: Serialize>(
&self,
claims: JWTClaims<CustomClaims>,
options: &EncryptionOptions,
) -> Result<String, Error>
pub fn encrypt_with_options<CustomClaims: Serialize>( &self, claims: JWTClaims<CustomClaims>, options: &EncryptionOptions, ) -> Result<String, Error>
Encrypt claims into a JWE token with options.
Trait Implementations§
Source§impl Clone for EcdhEsA128KWEncryptionKey
impl Clone for EcdhEsA128KWEncryptionKey
Source§fn clone(&self) -> EcdhEsA128KWEncryptionKey
fn clone(&self) -> EcdhEsA128KWEncryptionKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EcdhEsA128KWEncryptionKey
impl RefUnwindSafe for EcdhEsA128KWEncryptionKey
impl Send for EcdhEsA128KWEncryptionKey
impl Sync for EcdhEsA128KWEncryptionKey
impl Unpin for EcdhEsA128KWEncryptionKey
impl UnsafeUnpin for EcdhEsA128KWEncryptionKey
impl UnwindSafe for EcdhEsA128KWEncryptionKey
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