pub struct RsaParameters(&'static Algorithm, &'static RsaPadding, RangeInclusive<u32>, &'static RsaVerificationAlgorithmId);
Expand description
Parameters for RSA verification.
Tuple Fields§
§0: &'static Algorithm
§1: &'static RsaPadding
§2: RangeInclusive<u32>
§3: &'static RsaVerificationAlgorithmId
Implementations§
Source§impl RsaParameters
impl RsaParameters
pub(crate) fn digest_algorithm(&self) -> &'static Algorithm
pub(crate) fn padding(&self) -> &'static RsaPadding
pub(crate) fn bit_size_range(&self) -> &RangeInclusive<u32>
Source§impl RsaParameters
impl RsaParameters
pub(crate) const fn new( digest_alg: &'static Algorithm, padding: &'static RsaPadding, range: RangeInclusive<u32>, verification_alg: &'static RsaVerificationAlgorithmId, ) -> Self
Sourcepub fn public_modulus_len(public_key: &[u8]) -> Result<u32, Unspecified>
pub fn public_modulus_len(public_key: &[u8]) -> Result<u32, Unspecified>
Parses a DER-encoded RSAPublicKey
structure (RFC 8017) to determine its size in bits.
§Errors
error::Unspecified
on parse error.
Sourcepub fn min_modulus_len(&self) -> u32
pub fn min_modulus_len(&self) -> u32
Minimum modulus length in bits.
Sourcepub fn max_modulus_len(&self) -> u32
pub fn max_modulus_len(&self) -> u32
Maximum modulus length in bits.
Trait Implementations§
Source§impl Debug for RsaParameters
impl Debug for RsaParameters
Source§impl VerificationAlgorithm for RsaParameters
impl VerificationAlgorithm for RsaParameters
Source§fn verify_sig(
&self,
public_key: &[u8],
msg: &[u8],
signature: &[u8],
) -> Result<(), Unspecified>
fn verify_sig( &self, public_key: &[u8], msg: &[u8], signature: &[u8], ) -> Result<(), Unspecified>
impl Sealed for RsaParameters
Auto Trait Implementations§
impl Freeze for RsaParameters
impl RefUnwindSafe for RsaParameters
impl Send for RsaParameters
impl Sync for RsaParameters
impl Unpin for RsaParameters
impl UnwindSafe for RsaParameters
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