pub struct PrivateKey { /* private fields */ }Implementations§
Source§impl PrivateKey
impl PrivateKey
pub fn decrypt_bytes(&self, ciphertext: &[u8]) -> Result<Vec<u8>, Error>
pub fn encrypt_bytes<R>( &self, bytes: Sensitive<Box<[u8]>>, rng: &mut R, ) -> Result<Vec<u8>, Error>
pub fn id(&self) -> &str
pub fn sign_claims<C>(&self, claims: C) -> Result<Jws, Error>
pub fn sign_json_web_token<C, H>(&self, token: Jwt<C, H>) -> Result<Jws, Error>
pub fn generate<R>(rng: &mut R) -> Result<Self, Error>
pub fn to_json_web_key(&self) -> JsonWebKey
pub fn to_json(&self) -> Result<Value, Error>
pub fn verify_json_web_signature(&self, jws: &Jws) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for PrivateKey
impl Clone for PrivateKey
Source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
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 moreSource§impl Debug for PrivateKey
impl Debug for PrivateKey
Source§impl PartialEq for PrivateKey
impl PartialEq for PrivateKey
impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin for PrivateKey
impl UnwindSafe for PrivateKey
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