pub struct EcdhEsA256KWEncryptionKey { /* private fields */ }Expand description
P-256 public key for ECDH-ES+A256KW encryption.
Implementations§
Source§impl EcdhEsA256KWEncryptionKey
impl EcdhEsA256KWEncryptionKey
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 to_bytes_uncompressed(&self) -> Vec<u8> ⓘ
pub fn to_bytes_uncompressed(&self) -> Vec<u8> ⓘ
Export as SEC1 uncompressed bytes.
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 EcdhEsA256KWEncryptionKey
impl Clone for EcdhEsA256KWEncryptionKey
Source§fn clone(&self) -> EcdhEsA256KWEncryptionKey
fn clone(&self) -> EcdhEsA256KWEncryptionKey
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 EcdhEsA256KWEncryptionKey
impl RefUnwindSafe for EcdhEsA256KWEncryptionKey
impl Send for EcdhEsA256KWEncryptionKey
impl Sync for EcdhEsA256KWEncryptionKey
impl Unpin for EcdhEsA256KWEncryptionKey
impl UnsafeUnpin for EcdhEsA256KWEncryptionKey
impl UnwindSafe for EcdhEsA256KWEncryptionKey
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