SHA1CryptoServiceProvider 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Derived cryptographic types are obsolete. Use the Create method on the base type instead.
利用密碼服務提供者(CSP)提供的實作計算 SHA1 輸入資料的雜湊值。 此類別無法獲得繼承。
public ref class SHA1CryptoServiceProvider sealed : System::Security::Cryptography::SHA1
[System.Obsolete("Derived cryptographic types are obsolete. Use the Create method on the base type instead.", DiagnosticId="SYSLIB0021", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class SHA1CryptoServiceProvider : System.Security.Cryptography.SHA1
public sealed class SHA1CryptoServiceProvider : System.Security.Cryptography.SHA1
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SHA1CryptoServiceProvider : System.Security.Cryptography.SHA1
[<System.Obsolete("Derived cryptographic types are obsolete. Use the Create method on the base type instead.", DiagnosticId="SYSLIB0021", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SHA1CryptoServiceProvider = class
inherit SHA1
type SHA1CryptoServiceProvider = class
inherit SHA1
[<System.Runtime.InteropServices.ComVisible(true)>]
type SHA1CryptoServiceProvider = class
inherit SHA1
Public NotInheritable Class SHA1CryptoServiceProvider
Inherits SHA1
- 繼承
- 屬性
備註
該 SHA1CryptoServiceProvider 類別的雜湊大小為 160 位元。
Important
此類型會實作 IDisposable 介面。 當您完成使用這個物品後,應直接或間接地處理它。 若要直接處置類型,請在 Disposetry/ 區塊中呼叫其 catch 方法。 若要間接處置它,請使用語言建構,例如 using (C#) 或 Using (在 Visual Basic 中)。 如需詳細資訊,請參閱介面主題中的
由於 SHA-1 發生衝突問題,Microsoft 建議採用基於 SHA-256 或更高層級的安全性模型。
建構函式
| 名稱 | Description |
|---|---|
| SHA1CryptoServiceProvider() |
已淘汰.
初始化 SHA1CryptoServiceProvider 類別的新執行個體。 |
欄位
| 名稱 | Description |
|---|---|
| HashSizeInBits |
已淘汰.
SHA-1 演算法產生的雜湊大小,單位為位元。 (繼承來源 SHA1) |
| HashSizeInBytes |
已淘汰.
SHA-1 演算法產生的雜湊大小,以位元組為單位。 (繼承來源 SHA1) |
| HashSizeValue |
已淘汰.
代表計算出的雜湊碼大小(以位元為單位)。 (繼承來源 HashAlgorithm) |
| HashValue |
已淘汰.
代表計算出的雜湊碼值。 (繼承來源 HashAlgorithm) |
| State |
已淘汰.
代表雜湊計算的狀態。 (繼承來源 HashAlgorithm) |
屬性
| 名稱 | Description |
|---|---|
| CanReuseTransform |
已淘汰.
會得到一個值,表示電流轉換是否可以重複使用。 (繼承來源 HashAlgorithm) |
| CanTransformMultipleBlocks |
已淘汰.
當在派生類別中覆寫時,會得到一個值,表示是否可以轉換多個區塊。 (繼承來源 HashAlgorithm) |
| Hash |
已淘汰.
取得計算出的雜湊碼值。 (繼承來源 HashAlgorithm) |
| HashSize |
已淘汰.
取得計算出的雜湊碼大小(以位元為單位)。 (繼承來源 HashAlgorithm) |
| InputBlockSize |
已淘汰.
當在衍生類別中覆寫時,會得到輸入區塊大小。 (繼承來源 HashAlgorithm) |
| OutputBlockSize |
已淘汰.
當在衍生類別中覆寫時,會得到輸出區塊大小。 (繼承來源 HashAlgorithm) |
方法
明確介面實作
| 名稱 | Description |
|---|---|
| IDisposable.Dispose() |
已淘汰.
釋放 未管理的資源, HashAlgorithm 並可選擇性地釋放受管理資源。 (繼承來源 HashAlgorithm) |