Hash.SHA1 Property


Gets the SHA1 hash value for the assembly.

 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()

Property Value


A byte array that represents the SHA1 hash value for the assembly.


The following example computes the SHA1 hash for myAssembly and stores it in 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


The assembly specified in the constructor provides the bytes for the hash computation.

Due to collision problems with SHA1, Microsoft recommends SHA256.

Applies to