Rfc2898DeriveBytes.CryptDeriveKey(String, String, Int32, Byte[]) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Cuidado
Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead.
Deriva uma chave criptográfica do Rfc2898DeriveBytes objeto.
public:
cli::array <System::Byte> ^ CryptDeriveKey(System::String ^ algname, System::String ^ alghashname, int keySize, cli::array <System::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);
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}")>]
member this.CryptDeriveKey : string * string * int * byte[] -> byte[]
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
O nome do algoritmo para o qual derivar a chave.
- alghashname
- String
O nome do algoritmo de hash a ser usado para derivar a chave.
- keySize
- Int32
O tamanho da chave, em bits, a ser derivada.
- rgbIV
- Byte[]
O iv (vetor de inicialização) a ser usado para derivar a chave.
Retornos
A chave derivada.
- Atributos
Exceções
O keySize parâmetro está incorreto.
- ou -
O CSP (provedor de serviços criptográficos) não pode ser adquirido.
- ou -
O algname parâmetro não é um nome de algoritmo válido.
- ou -
O alghashname parâmetro não é um nome de algoritmo de hash válido.
Comentários
Essa função é um wrapper para a função de API de Criptografia CryptDeriveKey() e destina-se a oferecer interoperabilidade com aplicativos usando a API de Criptografia.
Se o keySize parâmetro for definido como 0 bits, o tamanho da chave padrão para o algoritmo especificado será usado.