Struct jwt_simple::algorithms::RS256KeyPair
source · [−]pub struct RS256KeyPair { /* private fields */ }Implementations
sourceimpl RS256KeyPair
impl RS256KeyPair
pub fn from_der(der: &[u8]) -> Result<Self, Error>
pub fn from_pem(pem: &str) -> Result<Self, Error>
pub fn to_der(&self) -> Result<Vec<u8>, Error>
pub fn to_pem(&self) -> Result<String, Error>
pub fn public_key(&self) -> RS256PublicKey
pub fn generate(modulus_bits: usize) -> Result<Self, Error>
pub fn with_key_id(self, key_id: &str) -> Self
Trait Implementations
sourceimpl Clone for RS256KeyPair
impl Clone for RS256KeyPair
sourcefn clone(&self) -> RS256KeyPair
fn clone(&self) -> RS256KeyPair
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for RS256KeyPair
impl Debug for RS256KeyPair
sourceimpl RSAKeyPairLike for RS256KeyPair
impl RSAKeyPairLike for RS256KeyPair
fn jwt_alg_name() -> &'static str
fn key_pair(&self) -> &RSAKeyPair
fn key_id(&self) -> &Option<String>
fn metadata(&self) -> &Option<KeyMetadata>
fn attach_metadata(&mut self, metadata: KeyMetadata) -> Result<(), Error>
fn hash(message: &[u8]) -> Vec<u8>
fn padding_scheme(&self) -> PaddingScheme
fn sign<CustomClaims: Serialize + DeserializeOwned>(
&self,
claims: JWTClaims<CustomClaims>
) -> Result<String, Error>
Auto Trait Implementations
impl RefUnwindSafe for RS256KeyPair
impl Send for RS256KeyPair
impl Sync for RS256KeyPair
impl Unpin for RS256KeyPair
impl UnwindSafe for RS256KeyPair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more