CodeChecksumPragma.ChecksumAlgorithmId Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應