pub struct RS256Vk(VerifyingKey<Sha256>);Expand description
RS256 public key
Note: When a rsa::RsaPublicKey is used for signing under rsa::pkcs1v15, a prefix is added
to identify the hash used. This additional information is encapsulated
in a rsa::pkcs1v15::VerifyingKey, which is just a rsa::RsaPublicKey plus prefix.
Tuple Fields§
§0: VerifyingKey<Sha256>Implementations§
Source§impl RS256Vk
impl RS256Vk
pub fn new(pk: RsaPublicKey) -> Self
pub fn from_public_key_pem(pem: &str) -> Result<Self>
pub fn to_public_key_pem(&self) -> Result<String>
Sourcepub fn as_rsa_pk(&self) -> &RsaPublicKey
pub fn as_rsa_pk(&self) -> &RsaPublicKey
Returns the underlying rsa::RsaPublicKey, which completely determines this RS256Vk.
Trait Implementations§
Source§impl PartialEq for RS256Vk
For some reason PartialEq is not implemented for rsa::pkcs1v15::VerifyingKey.
impl PartialEq for RS256Vk
For some reason PartialEq is not implemented for rsa::pkcs1v15::VerifyingKey.
Maybe because checking equality of the prefix is often redundant, as it is in this case.
Source§impl VerifyingKey for RS256Vk
impl VerifyingKey for RS256Vk
impl Eq for RS256Vk
rsa::RsaPublicKey implements Eq.`
Auto Trait Implementations§
impl Freeze for RS256Vk
impl RefUnwindSafe for RS256Vk
impl Send for RS256Vk
impl Sync for RS256Vk
impl Unpin for RS256Vk
impl UnsafeUnpin for RS256Vk
impl UnwindSafe for RS256Vk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more