Skip to main content

RsaSignatureEncoding

Struct RsaSignatureEncoding 

Source
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 RsaSigningAlgorithmId

Implementations§

Source§

impl RsaSignatureEncoding

Source

pub(crate) const fn new( digest_alg: &'static Algorithm, padding: &'static RsaPadding, sig_alg: &'static RsaSigningAlgorithmId, ) -> Self

Source

pub(super) fn digest_algorithm(&self) -> &'static Algorithm

Source

pub(super) fn padding(&self) -> &'static RsaPadding

Source

pub(super) fn pss_salt_length(&self) -> RsaPssSaltLength

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl RsaEncoding for RsaSignatureEncoding

Source§

fn encoding(&'static self) -> &'static RsaSignatureEncoding

The signature encoding.
Source§

impl Sealed for RsaSignatureEncoding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.