DSA.SignData 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
計算指定資料的雜湊值並簽名。
多載
| 名稱 | Description |
|---|---|
| SignData(Byte[], HashAlgorithmName) |
利用指定的雜湊演算法計算指定位元組陣列的雜湊值,並對所得雜湊值進行簽名。 |
| SignData(Stream, HashAlgorithmName) |
利用指定的雜湊演算法計算指定串流的雜湊值,並對所得雜湊值進行簽名。 |
| SignData(Byte[], HashAlgorithmName, DSASignatureFormat) |
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。 |
| SignData(Stream, HashAlgorithmName, DSASignatureFormat) |
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。 |
| SignData(Byte[], Int32, Int32, HashAlgorithmName) |
利用指定的雜湊演算法計算指定位元組陣列中某部分的雜湊值,並對所得雜湊值進行簽名。 |
| SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat) |
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。 |
SignData(Byte[], HashAlgorithmName)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
利用指定的雜湊演算法計算指定位元組陣列的雜湊值,並對所得雜湊值進行簽名。
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
member this.SignData : byte[] * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Function SignData (data As Byte(), hashAlgorithm As HashAlgorithmName) As Byte()
參數
- data
- Byte[]
輸入資料,用以計算雜湊值。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
適用於
SignData(Stream, HashAlgorithmName)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
利用指定的雜湊演算法計算指定串流的雜湊值,並對所得雜湊值進行簽名。
public:
virtual cli::array <System::Byte> ^ SignData(System::IO::Stream ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Overridable Function SignData (data As Stream, hashAlgorithm As HashAlgorithmName) As Byte()
參數
- data
- Stream
計算雜湊值的輸入串流。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
適用於
SignData(Byte[], HashAlgorithmName, DSASignatureFormat)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Byte(), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()
參數
- data
- Byte[]
要簽署的數據。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
- signatureFormat
- DSASignatureFormat
簽名的編碼格式。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
signatureFormat 不是一個已知的格式。
hashAlgorithm有 a null 或 空。Name
雜湊或簽名操作發生錯誤。
適用於
SignData(Stream, HashAlgorithmName, DSASignatureFormat)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。
public:
cli::array <System::Byte> ^ SignData(System::IO::Stream ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Stream, hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()
參數
- data
- Stream
要簽署的數據。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
- signatureFormat
- DSASignatureFormat
簽名的編碼格式。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
signatureFormat 不是一個已知的格式。
hashAlgorithm有 a null 或 空。Name
雜湊或簽名操作發生錯誤。
適用於
SignData(Byte[], Int32, Int32, HashAlgorithmName)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
利用指定的雜湊演算法計算指定位元組陣列中某部分的雜湊值,並對所得雜湊值進行簽名。
public:
virtual cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, int offset, int count, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Overridable Function SignData (data As Byte(), offset As Integer, count As Integer, hashAlgorithm As HashAlgorithmName) As Byte()
參數
- data
- Byte[]
輸入資料,用以計算雜湊值。
- offset
- Int32
從陣列開始使用資料的偏移量。
- count
- Int32
陣列中可用作資料的位元組數。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
適用於
SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
- 來源:
- DSA.cs
計算指定資料的雜湊值,並以指定的簽章格式進行簽名。
public:
cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ data, int offset, int count, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignData (data As Byte(), offset As Integer, count As Integer, hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Byte()
參數
- data
- Byte[]
要簽署的數據。
- offset
- Int32
從哪裡開始雜湊的偏移 data 量。
- count
- Int32
從 中讀取 data的位元組數。
- hashAlgorithm
- HashAlgorithmName
用來產生雜湊值的雜湊演算法。
- signatureFormat
- DSASignatureFormat
簽名的編碼格式。
傳回
指定資料的 DSA 簽章。
例外狀況
data 是 null。
signatureFormat 不是一個已知的格式。
-或者- offset 小於零。
-或者- count 小於零。
-或- offset + count -1 會得到一個超過上 data界的指標。
hashAlgorithm有 a null 或 空。Name
雜湊或簽名操作發生錯誤。