편집

다음을 통해 공유


CodeChecksumPragma.ChecksumAlgorithmId Property

Definition

Gets or sets a GUID that identifies the checksum algorithm to use.

public:
 property Guid ChecksumAlgorithmId { Guid get(); void set(Guid value); };
public Guid ChecksumAlgorithmId { get; set; }
member this.ChecksumAlgorithmId : Guid with get, set
Public Property ChecksumAlgorithmId As Guid

Property Value

A Guid that identifies the checksum algorithm to use.

Examples

The following code example shows the setting of the ChecksumAlgorithmId property. This code example is part of a larger example provided for the CodeChecksumPragma class.

pragma1.ChecksumAlgorithmId = HashMD5;
pragma1.ChecksumAlgorithmId = HashMD5

Remarks

Algorithms are provided for the MD5 and SHA1 hashes. The GUID value to use for the MD5 hash is {0x406ea660, 0x64cf, 0x4c82, 0xb6, 0xf0, 0x42, 0xd4, 0x81, 0x72, 0xa7, 0x99}. The GUID to use for the SHA1 hash is {0xff1816ec, 0xaa5e, 0x4d10, 0x87, 0xf7, 0x6f, 0x49, 0x63, 0x83, 0x34, 0x60}.

The calculation of the checksum is language-specific. That is, the language vendor can use any of the hashing algorithms known to the debugger to calculate the checksum. The use of a GUID for this property provides hash algorithm extensibility.

Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better.

Applies to