Share via


Hash.SHA1 屬性

定義

取得組件的 SHA1 雜湊值。

public:
 property cli::array <System::Byte> ^ SHA1 { cli::array <System::Byte> ^ get(); };
public byte[] SHA1 { get; }
member this.SHA1 : byte[]
Public ReadOnly Property SHA1 As Byte()

屬性值

Byte[]

位元組陣列,表示組件的 SHA1 雜湊值。

範例

下列範例會計算 的 SHA1myAssembly 雜湊,並將其儲存在 hashcode 中。

Hash^ hash = gcnew Hash( myAssembly );
array<Byte>^ hashcode = hash->SHA1;
Hash hash = new Hash ( myAssembly );
Byte[] hashcode = hash.SHA1;
Dim hash As New Hash(myAssembly)
Dim hashcode As Byte() = hash.SHA1

備註

建構函式中指定的元件會提供雜湊計算的位元組。

由於 SHA1 的衝突問題,Microsoft 建議使用 SHA256。

適用於