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 duplicate 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§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.
impl<T> DecodeOwned for Twhere
T: for<'a> Decode<'a>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 192 bytes