Rfc2898DeriveBytes.CryptDeriveKey(String, String, Int32, Byte[]) メソッド

定義

注意事項

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

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()

パラメーター

algname
String

キーを派生させる対象となるアルゴリズム名。

alghashname
String

キーを派生させるために使用するハッシュ アルゴリズム名。

keySize
Int32

派生させるキーのサイズ (ビット単位)。

rgbIV
Byte[]

キーを派生させるために使用する初期化ベクター (IV: Initialization Vector)。

戻り値

Byte[]

派生させたキー。

属性

例外

keySize パラメーターが正しくありません。

  • または - 暗号化サービス プロバイダー (CSP) を取得できません。

  • または - algname パラメーターが有効なアルゴリズム名ではありません。

  • または - alghashname パラメーターが有効なハッシュ アルゴリズム名ではありません。

注釈

この関数は、Crypto API 関数 CryptDeriveKey() のラッパーであり、Crypto API を使用してアプリケーションとの相互運用性を提供することを目的としています。

パラメーターが keySize 0 ビットに設定されている場合は、指定したアルゴリズムの既定のキー サイズが使用されます。

適用対象