2using System.Collections.Generic;
12 private readonly
byte[] salt;
13 private readonly
byte[] key;
14 private readonly
int iterations;
27 throw new ArgumentException(
"Must be postitive.", nameof(
Iterations));
30 throw new ArgumentException(
"Must be postitive.", nameof(
Iterations));
42 protected byte[]
Key => this.key;
52 protected byte[]
Salt => this.salt;
Encodes data using the Distinguished Encoding Rules (DER), as defined in X.690
void EndSEQUENCE()
Ends the current SEQUENCE.
void OBJECT_IDENTIFIER(string OID)
Encodes an OBJECT IDENTIFIER value.
void INTEGER(long Value)
Encodes an INTEGER value.
void StartSEQUENCE()
Starts a SEQUENCE.
void OCTET_STRING(byte[] Value)
Encodes an OCTET STRING value.
Abstract base class for password-based encryption algorithms
abstract string AlgorithmOID
Object Identity for the algorithm.
Implements a password-based encryption algorithm, as defined in §C, RFC 7292 (PKCS#12).
int Iterations
Number of iterations.
override void EncodePkcs5AlgorithmIdentifier(DerEncoder Der)
Encodes the AlgorithmIdentifier, as defined in PKCS#5 (RFC 2898).
PbePkcs12(string Password, int Iterations, int KeyLength, HashFunction HashFunction)
Implements a password-based encryption algorithm, as defined in §C, RFC 7292 (PKCS#12).
Encodes certificates and keys into PKCS#12 or PFX files.
static byte[] GetRandomBytes(int NrBytes)
Gets a number of random bytes.
HashFunction
Hash method enumeration.