#[non_exhaustive]pub enum Pbkdf2Prf {
HmacWithSha1,
HmacWithSha224,
HmacWithSha256,
HmacWithSha384,
HmacWithSha512,
}Expand description
Pseudo-random function used by PBKDF2.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
HmacWithSha1
HMAC with SHA1
HmacWithSha224
HMAC with SHA-224
HmacWithSha256
HMAC with SHA-256
HmacWithSha384
HMAC with SHA-384
HmacWithSha512
HMAC with SHA-512
Implementations§
Source§impl Pbkdf2Prf
impl Pbkdf2Prf
Sourcepub fn oid(self) -> ObjectIdentifier
pub fn oid(self) -> ObjectIdentifier
Get the ObjectIdentifier (a.k.a OID) for this algorithm.
Trait Implementations§
Source§impl Default for Pbkdf2Prf
Default PRF as specified in RFC 8018 Appendix A.2:
impl Default for Pbkdf2Prf
Default PRF as specified in RFC 8018 Appendix A.2:
prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT algid-hmacWithSHA1Note that modern usage should avoid the use of SHA-1, despite it being the “default” here.
Source§impl Encode for Pbkdf2Prf
impl Encode for Pbkdf2Prf
Source§fn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
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.
Source§impl<'a> From<Pbkdf2Prf> for AlgorithmIdentifierRef<'a>
impl<'a> From<Pbkdf2Prf> for AlgorithmIdentifierRef<'a>
impl Copy for Pbkdf2Prf
impl Eq for Pbkdf2Prf
impl StructuralPartialEq for Pbkdf2Prf
Auto Trait Implementations§
impl Freeze for Pbkdf2Prf
impl RefUnwindSafe for Pbkdf2Prf
impl Send for Pbkdf2Prf
impl Sync for Pbkdf2Prf
impl Unpin for Pbkdf2Prf
impl UnsafeUnpin for Pbkdf2Prf
impl UnwindSafe for Pbkdf2Prf
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