pub struct RsaPssParams<'a> {
pub hash: AlgorithmIdentifierRef<'a>,
pub mask_gen: AlgorithmIdentifier<AlgorithmIdentifierRef<'a>>,
pub salt_len: u8,
pub trailer_field: TrailerField,
}
Expand description
PKCS#1 RSASSA-PSS parameters as defined in RFC 8017 Appendix 2.3
ASN.1 structure containing a serialized RSASSA-PSS parameters:
RSASSA-PSS-params ::= SEQUENCE {
hashAlgorithm [0] HashAlgorithm DEFAULT sha1,
maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
saltLength [2] INTEGER DEFAULT 20,
trailerField [3] TrailerField DEFAULT trailerFieldBC
}
HashAlgorithm ::= AlgorithmIdentifier
MaskGenAlgorithm ::= AlgorithmIdentifier
Fields§
§hash: AlgorithmIdentifierRef<'a>
Hash Algorithm
mask_gen: AlgorithmIdentifier<AlgorithmIdentifierRef<'a>>
Mask Generation Function (MGF)
salt_len: u8
Salt length
trailer_field: TrailerField
Trailer field (i.e. TrailerField::BC
)
Implementations§
source§impl<'a> RsaPssParams<'a>
impl<'a> RsaPssParams<'a>
sourcepub const SALT_LEN_DEFAULT: u8 = 20u8
pub const SALT_LEN_DEFAULT: u8 = 20u8
Default RSA PSS Salt length in RsaPssParams
sourcepub fn new<D>(salt_len: u8) -> Selfwhere
D: AssociatedOid,
pub fn new<D>(salt_len: u8) -> Selfwhere
D: AssociatedOid,
Create new RsaPssParams for the provided digest and salt len
Trait Implementations§
source§impl<'a> Clone for RsaPssParams<'a>
impl<'a> Clone for RsaPssParams<'a>
source§fn clone(&self) -> RsaPssParams<'a>
fn clone(&self) -> RsaPssParams<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for RsaPssParams<'a>
impl<'a> Debug for RsaPssParams<'a>
source§impl<'a> DecodeValue<'a> for RsaPssParams<'a>
impl<'a> DecodeValue<'a> for RsaPssParams<'a>
source§impl<'a> Default for RsaPssParams<'a>
impl<'a> Default for RsaPssParams<'a>
source§impl EncodeValue for RsaPssParams<'_>
impl EncodeValue for RsaPssParams<'_>
source§impl<'a> PartialEq for RsaPssParams<'a>
impl<'a> PartialEq for RsaPssParams<'a>
source§impl<'a> TryFrom<&'a [u8]> for RsaPssParams<'a>
impl<'a> TryFrom<&'a [u8]> for RsaPssParams<'a>
impl<'a> Eq for RsaPssParams<'a>
impl<'a> Sequence<'a> for RsaPssParams<'a>
impl<'a> StructuralPartialEq for RsaPssParams<'a>
Auto Trait Implementations§
impl<'a> Freeze for RsaPssParams<'a>
impl<'a> RefUnwindSafe for RsaPssParams<'a>
impl<'a> Send for RsaPssParams<'a>
impl<'a> Sync for RsaPssParams<'a>
impl<'a> Unpin for RsaPssParams<'a>
impl<'a> UnwindSafe for RsaPssParams<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.