Hash.SHA1 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 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 組裝的雜湊值。
範例
以下範例計算 SHA1 的 myAssembly 雜湊值並將其儲存在 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
備註
建構子中指定的組合語言提供雜湊計算所需的位元組。
由於 SHA-1 有碰撞問題,Microsoft 建議使用 SHA-256。