pub struct RsaSignatureEncoding {
digest_alg: &'static Algorithm,
padding: &'static RsaPadding,
pss_salt_length: RsaPssSaltLength,
sig_alg: &'static RsaSigningAlgorithmId,
}Expand description
Encoding type for an RSA signature
Fields§
§digest_alg: &'static Algorithm§padding: &'static RsaPadding§pss_salt_length: RsaPssSaltLength§sig_alg: &'static RsaSigningAlgorithmIdImplementations§
Source§impl RsaSignatureEncoding
impl RsaSignatureEncoding
pub(crate) const fn new( digest_alg: &'static Algorithm, padding: &'static RsaPadding, sig_alg: &'static RsaSigningAlgorithmId, ) -> Self
pub(super) fn digest_algorithm(&self) -> &'static Algorithm
pub(super) fn padding(&self) -> &'static RsaPadding
pub(super) fn pss_salt_length(&self) -> RsaPssSaltLength
Sourcepub const fn with_pss_salt_length(self, saltlen: RsaPssSaltLength) -> Self
pub const fn with_pss_salt_length(self, saltlen: RsaPssSaltLength) -> Self
Sets the PSS salt length to the given value.
This is ignored for PKCS#1 v1.5 parameters.
Due to the requirement of 'static references to the current type in
signature APIs, it is not possible to directly give the result of this
method to them, nor simply re-borrow it. Instead either the inline
&const { rsa_param.with_pss_salt_length(...) } expression syntax
should be used, or the following if Rust below 1.79 is used:
use aws_lc_rs::signature::{self, RsaPssSaltLength};
const SIGNING_ALG: signature::RsaSignatureEncoding =
signature::RSA_PSS_SHA256.with_pss_salt_length(RsaPssSaltLength::Custom(123));
// Now use `SIGNING_ALG` instead of `RSA_PSS_SHA256`.Trait Implementations§
Source§impl Debug for RsaSignatureEncoding
impl Debug for RsaSignatureEncoding
Source§impl RsaEncoding for RsaSignatureEncoding
impl RsaEncoding for RsaSignatureEncoding
Source§fn encoding(&'static self) -> &'static RsaSignatureEncoding
fn encoding(&'static self) -> &'static RsaSignatureEncoding
The signature encoding.
impl Sealed for RsaSignatureEncoding
Auto Trait Implementations§
impl Freeze for RsaSignatureEncoding
impl RefUnwindSafe for RsaSignatureEncoding
impl Send for RsaSignatureEncoding
impl Sync for RsaSignatureEncoding
impl Unpin for RsaSignatureEncoding
impl UnsafeUnpin for RsaSignatureEncoding
impl UnwindSafe for RsaSignatureEncoding
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