pub struct RsaOaepParams<Params> {
pub hash: AlgorithmIdentifier<Params>,
pub mask_gen: AlgorithmIdentifier<AlgorithmIdentifier<Params>>,
pub p_source: AlgorithmIdentifier<Params>,
}Expand description
PKCS#1 RSAES-OAEP parameters as defined in RFC 8017 Appendix 2.1
ASN.1 structure containing a serialized RSAES-OAEP parameters:
RSAES-OAEP-params ::= SEQUENCE {
hashAlgorithm [0] HashAlgorithm DEFAULT sha1,
maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
pSourceAlgorithm [2] PSourceAlgorithm DEFAULT pSpecifiedEmpty
}
HashAlgorithm ::= AlgorithmIdentifier
MaskGenAlgorithm ::= AlgorithmIdentifier
PSourceAlgorithm ::= AlgorithmIdentifierFields§
§hash: AlgorithmIdentifier<Params>Hash Algorithm
mask_gen: AlgorithmIdentifier<AlgorithmIdentifier<Params>>Mask Generation Function (MGF)
p_source: AlgorithmIdentifier<Params>The source (and possibly the value) of the label L
Implementations§
Source§impl<Params> RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef,
impl<Params> RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef,
fn context_specific_hash( &self, ) -> Option<ContextSpecificRef<'_, AlgorithmIdentifier<Params>>>
fn context_specific_p_source( &self, ) -> Option<ContextSpecificRef<'_, AlgorithmIdentifier<Params>>>
Source§impl<Params> RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef + From<AlgorithmIdentifierRef<'static>>,
Params: PartialEq,
impl<Params> RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef + From<AlgorithmIdentifierRef<'static>>,
Params: PartialEq,
fn context_specific_mask_gen( &self, ) -> Option<ContextSpecificRef<'_, AlgorithmIdentifier<AlgorithmIdentifier<Params>>>>
Source§impl<'a> RsaOaepParams<AnyRef<'a>>
impl<'a> RsaOaepParams<AnyRef<'a>>
Sourcepub fn new<D>() -> Selfwhere
D: AssociatedOid,
pub fn new<D>() -> Selfwhere
D: AssociatedOid,
Create new RsaOaepParams for the provided digest and default (empty) label
Sourcepub fn new_with_label<D>(label: &'a impl AsRef<[u8]>) -> RsaOaepParamsRef<'a>where
D: AssociatedOid,
pub fn new_with_label<D>(label: &'a impl AsRef<[u8]>) -> RsaOaepParamsRef<'a>where
D: AssociatedOid,
Create new RsaOaepParams for the provided digest and specified label
Trait Implementations§
Source§impl<Params: Clone> Clone for RsaOaepParams<Params>
impl<Params: Clone> Clone for RsaOaepParams<Params>
Source§fn clone(&self) -> RsaOaepParams<Params>
fn clone(&self) -> RsaOaepParams<Params>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Params: Debug> Debug for RsaOaepParams<Params>
impl<Params: Debug> Debug for RsaOaepParams<Params>
Source§impl<'a, Params> DecodeValue<'a> for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: DecodeValue<'a, Error = Error> + FixedTag + From<AlgorithmIdentifierRef<'static>>,
AlgorithmIdentifier<AlgorithmIdentifier<Params>>: DecodeValue<'a, Error = Error> + FixedTag,
Params: 'a,
impl<'a, Params> DecodeValue<'a> for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: DecodeValue<'a, Error = Error> + FixedTag + From<AlgorithmIdentifierRef<'static>>,
AlgorithmIdentifier<AlgorithmIdentifier<Params>>: DecodeValue<'a, Error = Error> + FixedTag,
Params: 'a,
Source§impl<Params> Default for RsaOaepParams<Params>
impl<Params> Default for RsaOaepParams<Params>
Source§impl<Params> EncodeValue for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef + From<AlgorithmIdentifierRef<'static>>,
for<'b> Option<ContextSpecificRef<'b, AlgorithmIdentifier<Params>>>: Encode,
for<'b> Option<ContextSpecificRef<'b, AlgorithmIdentifier<AlgorithmIdentifier<Params>>>>: Encode,
Params: PartialEq,
impl<Params> EncodeValue for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: AsAlgorithmIdentifierRef + From<AlgorithmIdentifierRef<'static>>,
for<'b> Option<ContextSpecificRef<'b, AlgorithmIdentifier<Params>>>: Encode,
for<'b> Option<ContextSpecificRef<'b, AlgorithmIdentifier<AlgorithmIdentifier<Params>>>>: Encode,
Params: PartialEq,
Source§impl<Params: PartialEq> PartialEq for RsaOaepParams<Params>
impl<Params: PartialEq> PartialEq for RsaOaepParams<Params>
Source§fn eq(&self, other: &RsaOaepParams<Params>) -> bool
fn eq(&self, other: &RsaOaepParams<Params>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, Params> TryFrom<&'a [u8]> for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: DecodeValue<'a, Error = Error> + FixedTag + From<AlgorithmIdentifierRef<'static>>,
AlgorithmIdentifier<AlgorithmIdentifier<Params>>: DecodeValue<'a, Error = Error> + FixedTag,
Params: 'a,
impl<'a, Params> TryFrom<&'a [u8]> for RsaOaepParams<Params>where
AlgorithmIdentifier<Params>: DecodeValue<'a, Error = Error> + FixedTag + From<AlgorithmIdentifierRef<'static>>,
AlgorithmIdentifier<AlgorithmIdentifier<Params>>: DecodeValue<'a, Error = Error> + FixedTag,
Params: 'a,
impl<Params: Eq> Eq for RsaOaepParams<Params>
impl<'a, Params> Sequence<'a> for RsaOaepParams<Params>
impl<Params> StructuralPartialEq for RsaOaepParams<Params>
Auto Trait Implementations§
impl<Params> Freeze for RsaOaepParams<Params>where
Params: Freeze,
impl<Params> RefUnwindSafe for RsaOaepParams<Params>where
Params: RefUnwindSafe,
impl<Params> Send for RsaOaepParams<Params>where
Params: Send,
impl<Params> Sync for RsaOaepParams<Params>where
Params: Sync,
impl<Params> Unpin for RsaOaepParams<Params>where
Params: Unpin,
impl<Params> UnsafeUnpin for RsaOaepParams<Params>where
Params: UnsafeUnpin,
impl<Params> UnwindSafe for RsaOaepParams<Params>where
Params: UnwindSafe,
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 + 'a,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
Source§type Error = <T as DecodeValue<'a>>::Error
type Error = <T as DecodeValue<'a>>::Error
Type returned in the event of a decoding error.
Source§fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
Attempt to decode this TLV message using the provided decoder. Read more
Source§impl<T> Encode for T
impl<T> Encode for T
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this TLV object in bytes when encoded as ASN.1 DER. Read more
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 TLV object to the provided byte slice, returning a sub-slice
containing the encoded message. Read more
Source§impl<T> IsConstructed for T
impl<T> IsConstructed for T
Source§const CONSTRUCTED: bool
const CONSTRUCTED: bool
ASN.1 constructed bit