Struct RsaPublicKeyComponents
pub struct RsaPublicKeyComponents<B>{
pub n: B,
pub e: B,
}
Expand description
Low-level API for RSA public keys.
When the public key is in DER-encoded PKCS#1 ASN.1 format, it is
recommended to use aws_lc_rs::signature::verify()
with
aws_lc_rs::signature::RSA_PKCS1_*
, because aws_lc_rs::signature::verify()
will handle the parsing in that case. Otherwise, this function can be used
to pass in the raw bytes for the public key components as
untrusted::Input
arguments.
Fields§
§n: B
The public modulus, encoded in big-endian bytes without leading zeros.
e: B
The public exponent, encoded in big-endian bytes without leading zeros.
Implementations§
§impl<B> PublicKeyComponents<B>
impl<B> PublicKeyComponents<B>
pub fn verify(
&self,
params: &RsaParameters,
message: &[u8],
signature: &[u8],
) -> Result<(), Unspecified>
pub fn verify( &self, params: &RsaParameters, message: &[u8], signature: &[u8], ) -> Result<(), Unspecified>
Verifies that signature
is a valid signature of message
using self
as the public key. params
determine what algorithm parameters
(padding, digest algorithm, key length range, etc.) are used in the
verification.
§Errors
error::Unspecified
if message
was not verified.
Trait Implementations§
§impl<B> Clone for PublicKeyComponents<B>
impl<B> Clone for PublicKeyComponents<B>
§fn clone(&self) -> PublicKeyComponents<B>
fn clone(&self) -> PublicKeyComponents<B>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl<B> Debug for PublicKeyComponents<B>
impl<B> Debug for PublicKeyComponents<B>
§impl<B> TryInto<PublicEncryptingKey> for PublicKeyComponents<B>
impl<B> TryInto<PublicEncryptingKey> for PublicKeyComponents<B>
§fn try_into(
self,
) -> Result<PublicEncryptingKey, <PublicKeyComponents<B> as TryInto<PublicEncryptingKey>>::Error>
fn try_into( self, ) -> Result<PublicEncryptingKey, <PublicKeyComponents<B> as TryInto<PublicEncryptingKey>>::Error>
Try to build a PublicEncryptingKey
from the public key components.
§Errors
error::Unspecified
if the key failed to verify.
§type Error = Unspecified
type Error = Unspecified
impl<B> Copy for PublicKeyComponents<B>
Auto Trait Implementations§
impl<B> Freeze for PublicKeyComponents<B>where
B: Freeze,
impl<B> RefUnwindSafe for PublicKeyComponents<B>where
B: RefUnwindSafe,
impl<B> Send for PublicKeyComponents<B>where
B: Send,
impl<B> Sync for PublicKeyComponents<B>where
B: Sync,
impl<B> Unpin for PublicKeyComponents<B>where
B: Unpin,
impl<B> UnwindSafe for PublicKeyComponents<B>where
B: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more