Skip to content

Commit 31b4b09

Browse files
authored
Make SHA algorithm names more consistent (#11104)
1 parent 3b6ab82 commit 31b4b09

File tree

65 files changed

+3360
-3385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3360
-3385
lines changed

xml/Microsoft.Extensions.Compliance.Redaction/HmacRedactor.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
</Base>
2525
<Interfaces />
2626
<Docs>
27-
<summary>
28-
A redactor using HMACSHA256 to encode data being redacted.
29-
</summary>
27+
<summary>Represents a redactor that uses HMAC SHA-256 to encode redacted data.</summary>
3028
<remarks>To be added.</remarks>
3129
</Docs>
3230
<Members>

xml/System.CodeDom/CodeChecksumPragma.xml

+70-69
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@
4747
<Docs>
4848
<summary>Represents a code checksum pragma code entity.</summary>
4949
<remarks>
50-
<format type="text/markdown"><![CDATA[
51-
52-
## Remarks
53-
The <xref:System.CodeDom.CodeChecksumPragma> class inherits from <xref:System.CodeDom.CodeDirective> and can be contained in a <xref:System.CodeDom.CodeDirectiveCollection>. <xref:System.CodeDom.CodeChecksumPragma> provides the unique identification of source files, including files that have been generated.
54-
55-
56-
57-
## Examples
58-
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma> class.
59-
50+
<format type="text/markdown"><![CDATA[
51+
52+
## Remarks
53+
The <xref:System.CodeDom.CodeChecksumPragma> class inherits from <xref:System.CodeDom.CodeDirective> and can be contained in a <xref:System.CodeDom.CodeDirectiveCollection>. <xref:System.CodeDom.CodeChecksumPragma> provides the unique identification of source files, including files that have been generated.
54+
55+
56+
57+
## Examples
58+
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma> class.
59+
6060
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet1":::
61-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet1":::
62-
61+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet1":::
62+
6363
]]></format>
6464
</remarks>
6565
</Docs>
@@ -106,14 +106,14 @@
106106
<Docs>
107107
<summary>Initializes a new instance of the <see cref="T:System.CodeDom.CodeChecksumPragma" /> class.</summary>
108108
<remarks>
109-
<format type="text/markdown"><![CDATA[
110-
111-
## Examples
112-
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma.%23ctor%2A> constructor. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
113-
109+
<format type="text/markdown"><![CDATA[
110+
111+
## Examples
112+
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma.%23ctor%2A> constructor. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
113+
114114
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet4":::
115-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet4":::
116-
115+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet4":::
116+
117117
]]></format>
118118
</remarks>
119119
</Docs>
@@ -159,19 +159,19 @@
159159
<param name="checksumData">A byte array that contains the checksum data.</param>
160160
<summary>Initializes a new instance of the <see cref="T:System.CodeDom.CodeChecksumPragma" /> class using a file name, a GUID representing the checksum algorithm, and a byte stream representing the checksum data.</summary>
161161
<remarks>
162-
<format type="text/markdown"><![CDATA[
163-
164-
## Remarks
165-
For more information on the `checksumAlgorithmId` parameter, see the <xref:System.CodeDom.CodeChecksumPragma.ChecksumAlgorithmId%2A> property.
166-
167-
168-
169-
## Examples
170-
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma.%23ctor%2A> constructor. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
171-
162+
<format type="text/markdown"><![CDATA[
163+
164+
## Remarks
165+
For more information on the `checksumAlgorithmId` parameter, see the <xref:System.CodeDom.CodeChecksumPragma.ChecksumAlgorithmId%2A> property.
166+
167+
168+
169+
## Examples
170+
The following code example shows the use of the <xref:System.CodeDom.CodeChecksumPragma.%23ctor%2A> constructor. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
171+
172172
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet8":::
173-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet8":::
174-
173+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet8":::
174+
175175
]]></format>
176176
</remarks>
177177
</Docs>
@@ -217,21 +217,22 @@
217217
<summary>Gets or sets a GUID that identifies the checksum algorithm to use.</summary>
218218
<value>A <see cref="T:System.Guid" /> that identifies the checksum algorithm to use.</value>
219219
<remarks>
220-
<format type="text/markdown"><![CDATA[
221-
222-
## Remarks
223-
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}.
224-
225-
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.
226-
227-
Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better.
228-
229-
## Examples
230-
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.ChecksumAlgorithmId%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
231-
220+
<format type="text/markdown"><![CDATA[
221+
222+
## Remarks
223+
224+
Algorithms are provided for the MD5 and SHA-1 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 SHA-1 hash is {0xff1816ec, 0xaa5e, 0x4d10, 0x87, 0xf7, 0x6f, 0x49, 0x63, 0x83, 0x34, 0x60}.
225+
226+
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.
227+
228+
Due to collision problems with SHA-1 and MD5, Microsoft recommends a security model based on SHA-256 or better.
229+
230+
## Examples
231+
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.ChecksumAlgorithmId%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.
232+
232233
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet6":::
233-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet6":::
234-
234+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet6":::
235+
235236
]]></format>
236237
</remarks>
237238
</Docs>
@@ -277,19 +278,19 @@
277278
<summary>Gets or sets the value of the data for the checksum calculation.</summary>
278279
<value>A byte array that contains the data for the checksum calculation.</value>
279280
<remarks>
280-
<format type="text/markdown"><![CDATA[
281-
282-
## Remarks
283-
The <xref:System.CodeDom.CodeChecksumPragma.ChecksumData%2A> property contains data from the target file specified by the <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property.
284-
285-
286-
287-
## Examples
288-
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.ChecksumData%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class
289-
281+
<format type="text/markdown"><![CDATA[
282+
283+
## Remarks
284+
The <xref:System.CodeDom.CodeChecksumPragma.ChecksumData%2A> property contains data from the target file specified by the <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property.
285+
286+
287+
288+
## Examples
289+
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.ChecksumData%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class
290+
290291
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet7":::
291-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet7":::
292-
292+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet7":::
293+
293294
]]></format>
294295
</remarks>
295296
</Docs>
@@ -331,19 +332,19 @@
331332
<summary>Gets or sets the path to the checksum file.</summary>
332333
<value>The path to the checksum file.</value>
333334
<remarks>
334-
<format type="text/markdown"><![CDATA[
335-
336-
## Remarks
337-
An example of a <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property value is "C:\Temp\Test\OuterLinePragma.txt".
338-
339-
340-
341-
## Examples
342-
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class
343-
335+
<format type="text/markdown"><![CDATA[
336+
337+
## Remarks
338+
An example of a <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property value is "C:\Temp\Test\OuterLinePragma.txt".
339+
340+
341+
342+
## Examples
343+
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.FileName%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class
344+
344345
:::code language="csharp" source="~/snippets/csharp/System.CodeDom/CodeChecksumPragma/Overview/codedirective.cs" id="Snippet5":::
345-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet5":::
346-
346+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.CodeDom.CodeDirectives/VB/codedirective.vb" id="Snippet5":::
347+
347348
]]></format>
348349
</remarks>
349350
</Docs>

xml/System.Configuration.Assemblies/AssemblyHashAlgorithm.xml

+20-20
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,25 @@
5454
<Docs>
5555
<summary>Specifies all the hash algorithms used for hashing files and for generating the strong name.</summary>
5656
<remarks>
57-
<format type="text/markdown"><![CDATA[
58-
59-
## Remarks
60-
A `hash function``H` is a transformation that takes an input `m` and returns a fixed-size string, which is called the hash value `h` (that is, `h` = `H` (`m`)). Hash functions with just this property have a variety of general computational uses, but when employed in cryptography, the hash functions are usually chosen to have some additional properties.
61-
62-
The basic requirements for a cryptographic hash function are:
63-
64-
- The input can be of any length.
65-
66-
- The output has a fixed length.
67-
68-
- `H` (`x)` is relatively easy to compute for any given x.
69-
70-
- `H` (`x`) is one-way.
71-
72-
- `H` (`x`) is collision-free.
73-
74-
The hash value represents concisely the longer message or document from which it was computed; this value is called the message digest. You can think of a message digest as a digital fingerprint of the larger document. Examples of well-known hash functions are MD2 and SHA.
75-
57+
<format type="text/markdown"><![CDATA[
58+
59+
## Remarks
60+
A `hash function``H` is a transformation that takes an input `m` and returns a fixed-size string, which is called the hash value `h` (that is, `h` = `H` (`m`)). Hash functions with just this property have a variety of general computational uses, but when employed in cryptography, the hash functions are usually chosen to have some additional properties.
61+
62+
The basic requirements for a cryptographic hash function are:
63+
64+
- The input can be of any length.
65+
66+
- The output has a fixed length.
67+
68+
- `H` (`x)` is relatively easy to compute for any given x.
69+
70+
- `H` (`x`) is one-way.
71+
72+
- `H` (`x`) is collision-free.
73+
74+
The hash value represents concisely the longer message or document from which it was computed; this value is called the message digest. You can think of a message digest as a digital fingerprint of the larger document. Examples of well-known hash functions are MD2 and SHA.
75+
7676
]]></format>
7777
</remarks>
7878
</Docs>
@@ -154,7 +154,7 @@
154154
</ReturnValue>
155155
<MemberValue>0</MemberValue>
156156
<Docs>
157-
<summary>A mask indicating that there is no hash algorithm. If you specify <see langword="None" /> for a multi-module assembly, the common language runtime defaults to the SHA1 algorithm, since multi-module assemblies need to generate a hash. Due to collision problems with SHA1, Microsoft recommends SHA256.</summary>
157+
<summary>A mask indicating that there is no hash algorithm. If you specify <see langword="None" /> for a multi-module assembly, the common language runtime defaults to the SHA-1 algorithm, since multi-module assemblies need to generate a hash. Due to collision problems with SHA-1, Microsoft recommends SHA-256.</summary>
158158
</Docs>
159159
</Member>
160160
<Member MemberName="SHA1">

xml/System.IO.Packaging/PackageDigitalSignatureManager.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ This property specifies where the signer's X.509 certificate will be stored when
273273
<format type="text/markdown"><![CDATA[
274274
275275
## Remarks
276-
The default hash algorithm for the standard <xref:System.IO.Packaging.PackageDigitalSignatureManager> class is <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigSHA1Url> (Secure Hash Algorithm version 1.0 (SHA1)).
276+
The default hash algorithm for the standard <xref:System.IO.Packaging.PackageDigitalSignatureManager> class is <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigSHA1Url> (Secure Hash Algorithm version 1.0, or SHA-1).
277277
278278
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property gets or sets the actual hash algorithm this is used to create and verify signatures.
279279
280280
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.DefaultHashAlgorithm%2A> property is typically used to reset the <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property back to default after a temporary change.
281281
282-
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
282+
Due to collision problems with SHA-1, Microsoft recommends a security model based on SHA-256 or better.
283283
284284
]]></format>
285285
</remarks>
@@ -360,7 +360,7 @@ This property specifies where the signer's X.509 certificate will be stored when
360360
361361
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property is typically not changed from its default. This property must be changed only if a signature that uses a different known and accessible <xref:System.Security.Cryptography.HashAlgorithm> is encountered. When finished with the signature that uses a different hash algorithm, call <xref:System.IO.Packaging.PackageDigitalSignatureManager.DefaultHashAlgorithm%2A> to reset the <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property back to default.
362362
363-
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
363+
Due to collision problems with SHA-1, Microsoft recommends a security model based on SHA-256 or better.
364364
365365
]]></format>
366366
</remarks>

0 commit comments

Comments
 (0)