キーを派生させるために使用するパスワード、キー salt、および暗号サービス プロバイダ (CSP : Cryptographic Service Provider) のパラメータを指定して、PasswordDeriveBytes クラスの新しいインスタンスを初期化します。
名前空間: System.Security.Cryptography
アセンブリ: mscorlib (mscorlib.dll 内)
構文
'宣言
Public Sub New ( _
strPassword As String, _
rgbSalt As Byte(), _
cspParams As CspParameters _
)
'使用
Dim strPassword As String
Dim rgbSalt As Byte()
Dim cspParams As CspParameters
Dim instance As New PasswordDeriveBytes(strPassword, rgbSalt, cspParams)
public PasswordDeriveBytes (
string strPassword,
byte[] rgbSalt,
CspParameters cspParams
)
public:
PasswordDeriveBytes (
String^ strPassword,
array<unsigned char>^ rgbSalt,
CspParameters^ cspParams
)
public PasswordDeriveBytes (
String strPassword,
byte[] rgbSalt,
CspParameters cspParams
)
public function PasswordDeriveBytes (
strPassword : String,
rgbSalt : byte[],
cspParams : CspParameters
)
適用できません。
パラメータ
- strPassword
キーを派生させる対象のパスワード。
- rgbSalt
キーを派生させるために使用するキー salt。
- cspParams
演算で使用する CSP パラメータ。
解説
![]() |
---|
パスワードをソース コード内にハードコーディングすることは絶対に避けてください。ハードコーディングされたパスワードは、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 名前空間