Rfc2898DeriveBytes.CryptDeriveKey(String, String, Int32, Byte[]) Método

Definición

Precaución

Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead.

Deriva una clave criptográfica a partir del objeto Rfc2898DeriveBytes.

public:
 cli::array <System::Byte> ^ CryptDeriveKey(System::String ^ algname, System::String ^ alghashname, int keySize, cli::array <System::Byte> ^ rgbIV);
public byte[] CryptDeriveKey (string algname, string alghashname, int keySize, byte[] rgbIV);
[System.Obsolete("Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead.", DiagnosticId="SYSLIB0033", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] CryptDeriveKey (string algname, string alghashname, int keySize, byte[] rgbIV);
member this.CryptDeriveKey : string * string * int * byte[] -> byte[]
[<System.Obsolete("Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead.", DiagnosticId="SYSLIB0033", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CryptDeriveKey : string * string * int * byte[] -> byte[]
Public Function CryptDeriveKey (algname As String, alghashname As String, keySize As Integer, rgbIV As Byte()) As Byte()

Parámetros

algname
String

Nombre del algoritmo para el que se va a derivar la clave.

alghashname
String

Nombre del algoritmo hash que se va a usar para derivar la clave.

keySize
Int32

Tamaño de la clave, en bits, que se va a derivar.

rgbIV
Byte[]

Vector de inicialización (IV) que se va a usar para derivar la clave.

Devoluciones

Byte[]

Clave derivada.

Atributos

Excepciones

El parámetro keySize no es correcto.

o bien

No se puede adquirir el proveedor de servicios criptográficos (CSP).

O bien

El parámetro algname no es un nombre de algoritmo válido.

o bien

El parámetro alghashname no es un nombre de algoritmo hash válido.

Comentarios

Esta función es un contenedor para la función de API crypto CryptDeriveKey() y está pensada para ofrecer interoperabilidad con aplicaciones que usan Crypto API.

Si el keySize parámetro se establece en 0 bits, se usa el tamaño de clave predeterminado para el algoritmo especificado.

Se aplica a