SHA1Managed 類別

定義

警告

Derived cryptographic types are obsolete. Use the Create method on the base type instead.

利用受管理函式庫計算 SHA1 輸入資料的雜湊值。

public ref class SHA1Managed sealed : System::Security::Cryptography::SHA1
public ref class SHA1Managed : 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 SHA1Managed : System.Security.Cryptography.SHA1
public sealed class SHA1Managed : System.Security.Cryptography.SHA1
public class SHA1Managed : System.Security.Cryptography.SHA1
[System.Runtime.InteropServices.ComVisible(true)]
public class SHA1Managed : 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 SHA1Managed = class
    inherit SHA1
type SHA1Managed = class
    inherit SHA1
[<System.Runtime.InteropServices.ComVisible(true)>]
type SHA1Managed = class
    inherit SHA1
Public NotInheritable Class SHA1Managed
Inherits SHA1
Public Class SHA1Managed
Inherits SHA1
繼承
SHA1Managed
屬性

備註

雜湊值作為固定大小的唯一值,代表大量資料。 兩組資料的雜湊值應匹配,當且僅當對應的資料也相符。 資料中的小變動會導致雜湊值大幅且不可預測地變化。

這是一個純管理的實作 SHA1 ,沒有包裝 CAPI。

演算法的 SHA1Managed 雜湊大小為 160 位元。

由於 SHA-1 發生衝突問題,Microsoft 建議採用基於 SHA-256 或更高層級的安全性模型。

建構函式

名稱 Description
SHA1Managed()
已淘汰.

初始化 SHA1Managed 類別的新執行個體。

欄位

名稱 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
Clear()
已淘汰.

釋放 HashAlgorithm 類別所使用的所有資源。

(繼承來源 HashAlgorithm)
ComputeHash(Byte[], Int32, Int32)
已淘汰.

計算指定位元組陣列中指定區域的雜湊值。

(繼承來源 HashAlgorithm)
ComputeHash(Byte[])
已淘汰.

計算指定位元組陣列的雜湊值。

(繼承來源 HashAlgorithm)
ComputeHash(Stream)
已淘汰.

計算指定 Stream 物件的雜湊值。

(繼承來源 HashAlgorithm)
ComputeHashAsync(Stream, CancellationToken)
已淘汰.

非同步計算指定 Stream 物件的雜湊值。

(繼承來源 HashAlgorithm)
Dispose()
已淘汰.

釋放目前類別實例 HashAlgorithm 所使用的所有資源。

(繼承來源 HashAlgorithm)
Dispose(Boolean)
已淘汰.

釋放物件使用的 SHA1Managed 未管理資源,並可選擇性地釋放受管理資源。

Dispose(Boolean)
已淘汰.

釋放 未管理的資源, HashAlgorithm 並可選擇性地釋放受管理資源。

(繼承來源 HashAlgorithm)
Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設哈希函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前實例的 Type

(繼承來源 Object)
HashCore(Byte[], Int32, Int32)
已淘汰.

將寫入物件的資料導向 SHA1Managed 雜湊演算法以計算雜湊值。

HashCore(Byte[], Int32, Int32)
已淘汰.

當在衍生類別中覆寫時,會將寫入物件的資料導向計算雜湊演算法。

(繼承來源 HashAlgorithm)
HashCore(ReadOnlySpan<Byte>)
已淘汰.

將寫入物件的資料導向雜湊演算法以計算雜湊值。

(繼承來源 HashAlgorithm)
HashFinal()
已淘汰.

在所有資料寫入物件後,回傳計算出的 SHA1 雜湊值。

HashFinal()
已淘汰.

當在衍生類別中覆寫時,會在最後資料被密碼雜湊演算法處理後完成雜湊計算。

(繼承來源 HashAlgorithm)
Initialize()
已淘汰.

初始化 的 SHA1Managed一個實例。

MemberwiseClone()
已淘汰.

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()
已淘汰.

傳回表示目前 物件的字串。

(繼承來源 Object)
TransformBlock(Byte[], Int32, Int32, Byte[], Int32)
已淘汰.

計算輸入位元組陣列指定區域的雜湊值,並將輸入位元組陣列的指定區域複製到輸出位元組陣列的指定區域。

(繼承來源 HashAlgorithm)
TransformFinalBlock(Byte[], Int32, Int32)
已淘汰.

計算指定位元組陣列中指定區域的雜湊值。

(繼承來源 HashAlgorithm)
TryComputeHash(ReadOnlySpan<Byte>, Span<Byte>, Int32)
已淘汰.

嘗試計算指定位元組陣列的雜湊值。

(繼承來源 HashAlgorithm)
TryHashFinal(Span<Byte>, Int32)
已淘汰.

嘗試在雜湊演算法處理最後資料後完成雜湊計算。

(繼承來源 HashAlgorithm)

明確介面實作

名稱 Description
IDisposable.Dispose()
已淘汰.

釋放 未管理的資源, HashAlgorithm 並可選擇性地釋放受管理資源。

(繼承來源 HashAlgorithm)

適用於

另請參閱