次の方法で共有


PasswordDeriveBytes コンストラクタ (String, Byte , String, Int32)

キーを派生させるために使用するパスワード、キー salt、ハッシュ名、および反復処理の回数を指定して、PasswordDeriveBytes クラスの新しいインスタンスを初期化します。

名前空間: System.Security.Cryptography
アセンブリ: mscorlib (mscorlib.dll 内)

構文

'宣言
Public Sub New ( _
    strPassword As String, _
    rgbSalt As Byte(), _
    strHashName As String, _
    iterations As Integer _
)
'使用
Dim strPassword As String
Dim rgbSalt As Byte()
Dim strHashName As String
Dim iterations As Integer

Dim instance As New PasswordDeriveBytes(strPassword, rgbSalt, strHashName, iterations)
public PasswordDeriveBytes (
    string strPassword,
    byte[] rgbSalt,
    string strHashName,
    int iterations
)
public:
PasswordDeriveBytes (
    String^ strPassword, 
    array<unsigned char>^ rgbSalt, 
    String^ strHashName, 
    int iterations
)
public PasswordDeriveBytes (
    String strPassword, 
    byte[] rgbSalt, 
    String strHashName, 
    int iterations
)
public function PasswordDeriveBytes (
    strPassword : String, 
    rgbSalt : byte[], 
    strHashName : String, 
    iterations : int
)
適用できません。

パラメータ

  • strPassword
    キーを派生させる対象のパスワード。
  • rgbSalt
    キーを派生させるために使用するキー salt。
  • strHashName
    演算で使用するハッシュ アルゴリズムの名前。
  • iterations
    演算の反復処理回数。

解説

セキュリティに関するメモセキュリティに関するメモ :

パスワードをソース コード内にハードコーディングすることは絶対に避けてください。ハードコーディングされたパスワードは、MSIL 逆アセンブラ (Ildasm.exe) ツールや 16 進エディタを使用したり、アセンブリを notepad.exe などのテキスト エディタで開いたりすることによって簡単にアセンブリから取得されてしまいます。

プラットフォーム

Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

PasswordDeriveBytes クラス
PasswordDeriveBytes メンバ
System.Security.Cryptography 名前空間

その他の技術情報

暗号サービス