RSA.SignHash 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
利用指定的填充計算指定雜湊值的簽章。
多載
| 名稱 | Description |
|---|---|
| SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) |
當在派生類別中覆寫時,會利用指定的填充計算指定雜湊值的簽章。 |
| SignHash(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) |
利用指定的填充計算指定雜湊值的簽章。 |
| SignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding) |
用目前的金鑰簽署雜湊值,並將簽章寫入提供的緩衝區。 |
SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
當在派生類別中覆寫時,會利用指定的填充計算指定雜湊值的簽章。
public:
virtual cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public:
abstract cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
public abstract byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
override this.SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
abstract member SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Overridable Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()
Public MustOverride Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()
參數
- hash
- Byte[]
要簽名的資料的雜湊值。
- hashAlgorithm
- HashAlgorithmName
用來產生資料雜湊值的雜湊演算法。
- padding
- RSASignaturePadding
填充物。
傳回
指定雜湊值的 RSA 簽名。
例外狀況
必須有一個衍生類別覆寫此方法。
hash 或 padding 為 null。
另請參閱
- TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32)
- SignData(Byte[], HashAlgorithmName, RSASignaturePadding)
適用於
SignHash(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
利用指定的填充計算指定雜湊值的簽章。
public:
cli::array <System::Byte> ^ SignHash(ReadOnlySpan<System::Byte> hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public byte[] SignHash(ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
member this.SignHash : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Function SignHash (hash As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()
參數
- hash
- ReadOnlySpan<Byte>
要簽名的資料的雜湊值。
- hashAlgorithm
- HashAlgorithmName
用於產生雜 hash湊值的雜湊演算法。
- padding
- RSASignaturePadding
填充模式。
傳回
指定雜湊值的 RSA 簽名。
例外狀況
padding 或 hashAlgorithm是 Namenull。
hashAlgorithm是 Name 空字串。
此實作未實作其中 TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) 之一或 SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)。
適用於
SignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding)
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
- 來源:
- RSA.cs
用目前的金鑰簽署雜湊值,並將簽章寫入提供的緩衝區。
public:
int SignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
member this.SignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> int
Public Function SignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Integer
參數
- hash
- ReadOnlySpan<Byte>
要簽名的資料的雜湊值。
- hashAlgorithm
- HashAlgorithmName
用於產生雜 hash湊值的雜湊演算法。
- padding
- RSASignaturePadding
填充模式。
傳回
寫入 destination的總位元組數。
例外狀況
padding 或 hashAlgorithm是 Namenull。
此實作未實作其中 TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) 之一或 SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)。