Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​Rfc2898DeriveBytes

Assembly: System.Security.Cryptography

Inheritance: object → DeriveBytes → Rfc2898DeriveBytes

Implements password-based key derivation functionality, PBKDF2, by using a pseudo-random number generator based on <see cref="T:System.Security.Cryptography.HMACSHA1" /> .

Properties

HashAlgorithm
Gets the hash algorithm used for byte derivation.
public int
IterationCount
Gets or sets the number of iterations for the operation.
public byte[]
Salt
Gets or sets the key salt value for the operation.

Methods

public byte[]
CryptDeriveKey​(string algname, string alghashname, int keySize, byte[] rgbIV)
algname The algorithm name for which to derive the key.
alghashname The hash algorithm name to use to derive the key.
keySize The size of the key, in bits, to derive.
rgbIV The initialization vector (IV) to use to derive the key.
Returns The derived key.
Derives a cryptographic key from the <see cref="T:System.Security.Cryptography.Rfc2898DeriveBytes" /> object.
protected void
Dispose​(bool disposing)
disposing <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.
Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.Rfc2898DeriveBytes" /> class and optionally releases the managed resources.
public byte[]
GetBytes​(int cb)
cb The number of pseudo-random key bytes to generate.
Returns A byte array filled with pseudo-random key bytes.
Returns the pseudo-random key for this object.
public void
Reset​()
Resets the state of the operation.
public void
Dispose​()
Inherited from DeriveBytes
When overridden in a derived class, releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.DeriveBytes" /> class.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object