指定したデータに対する DSA 署名を作成します。
Overrides Public Function CreateSignature( _
ByVal rgbHash() As Byte _) As Byte()
[C#]
public override byte[] CreateSignature(byte[] rgbHash);
[C++]
public: unsigned char CreateSignature(unsigned charrgbHash __gc[]) __gc[];
[JScript]
public override function CreateSignature(
rgbHash : Byte[]) : Byte[];
パラメータ
- rgbHash
署名するデータ。
戻り値
指定したデータに対するデジタル署名。
使用例
Try
'Create a new instance of DSACryptoServiceProvider.
Dim DSA As New DSACryptoServiceProvider()
'The hash to sign.
Dim Hash As Byte() = {59, 4, 248, 102, 77, 97, 142, 201, 210, 12, 224, 93, 25, 41, 100, 197, 213, 134, 130, 135}
'Sign the hash.
Dim SignedHash As Byte() = DSA.CreateSignature(Hash)
Catch e As CryptographicException
Console.WriteLine(e.Message)
End Try
[C#]
try
{
//Create a new instance of DSACryptoServiceProvider.
DSACryptoServiceProvider DSA = new DSACryptoServiceProvider();
//The hash to sign.
byte[] Hash = {59,4,248,102,77,97,142,201,210,12,224,93,25,41,100,197,213,134,130,135};
//Sign the hash.
byte[] SignedHash = DSA.CreateSignature(Hash);
}
catch(CryptographicException e)
{
Console.WriteLine(e.Message);
}
[C++]
try {
//Create a new instance of DSACryptoServiceProvider.
DSACryptoServiceProvider* DSA = new DSACryptoServiceProvider();
//The hash to sign.
Byte Hash[] = {59,4,248,102,77,97,142,201,210,12,224,93,25,41,100,197,213,134,130,135};
//Sign the hash.
Byte SignedHash[] = DSA->CreateSignature(Hash);
} catch (CryptographicException* e) {
Console::WriteLine(e->Message);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DSACryptoServiceProvider クラス | DSACryptoServiceProvider メンバ | System.Security.Cryptography 名前空間 | 暗号サービス