pub struct RsaOaepEncryptionKey { /* private fields */ }Expand description
RSA public key for encryption (RSA-OAEP with SHA-1).
Implementations§
Source§impl RsaOaepEncryptionKey
impl RsaOaepEncryptionKey
Sourcepub fn from_der(der: &[u8]) -> Result<Self, Error>
pub fn from_der(der: &[u8]) -> Result<Self, Error>
Create an encryption key from a DER-encoded public key.
Sourcepub fn from_pem(pem: &str) -> Result<Self, Error>
pub fn from_pem(pem: &str) -> Result<Self, Error>
Create an encryption key from a PEM-encoded public key.
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 RsaOaepEncryptionKey
impl Clone for RsaOaepEncryptionKey
Source§fn clone(&self) -> RsaOaepEncryptionKey
fn clone(&self) -> RsaOaepEncryptionKey
Returns a duplicate of the value. Read more
1.0.0 · 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 RsaOaepEncryptionKey
impl RefUnwindSafe for RsaOaepEncryptionKey
impl Send for RsaOaepEncryptionKey
impl Sync for RsaOaepEncryptionKey
impl Unpin for RsaOaepEncryptionKey
impl UnwindSafe for RsaOaepEncryptionKey
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