Struct PublicKeyComponents
pub struct PublicKeyComponents<B> {
pub n: B,
pub e: B,
}alloc and crypto and ring and std only.Expand description
RSA public key components.
B must implement AsRef<[u8]> like &[u8] or Vec<u8>.
Fields§
§n: BThe public modulus, encoded in big-endian bytes without leading zeros.
e: BThe 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.
When the public key is in DER-encoded PKCS#1 ASN.1 format, it is
recommended to use ring::signature::verify() with
ring::signature::RSA_PKCS1_*, because ring::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.
Trait Implementations§
§impl<B> Clone for PublicKeyComponents<B>where
B: Clone,
impl<B> Clone for PublicKeyComponents<B>where
B: Clone,
§fn clone(&self) -> PublicKeyComponents<B>
fn clone(&self) -> PublicKeyComponents<B>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<B> Copy for PublicKeyComponents<B>where
B: Copy,
§impl<B> Debug for PublicKeyComponents<B>where
B: Debug,
impl<B> Debug for PublicKeyComponents<B>where
B: Debug,
§impl<B> From<&PublicKey> for PublicKeyComponents<B>where
B: FromIterator<u8>,
impl<B> From<&PublicKey> for PublicKeyComponents<B>where
B: FromIterator<u8>,
§fn from(public_key: &PublicKey) -> PublicKeyComponents<B>
fn from(public_key: &PublicKey) -> 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> UnsafeUnpin for PublicKeyComponents<B>where
B: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§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