Skip to content

Commit 903912d

Browse files
authored
Fix line numbers for syntax highlighting (#23025)
* Fix line numbers for syntax highlighting * Update docs/standard/security/cryptography-model.md
1 parent 8423886 commit 903912d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/standard/security/cryptography-model.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: ".NET Cryptography Model"
2+
title: ".NET cryptography model"
33
description: Review implementations of usual cryptographic algorithms in .NET. Learn the extensible cryptography model of object inheritance, stream design, & configuration.
4-
ms.date: 07/14/2020
4+
ms.date: 02/26/2021
55
dev_langs:
66
- "csharp"
77
- "vb"
@@ -10,11 +10,11 @@ helpviewer_keywords:
1010
- "encryption [.NET], model"
1111
ms.assetid: 12fecad4-fbab-432a-bade-2f05976a2971
1212
---
13-
# .NET Cryptography Model
13+
# .NET cryptography model
1414

1515
.NET provides implementations of many standard cryptographic algorithms, and the .NET cryptography model is extensible.
1616

17-
## Object Inheritance
17+
## Object inheritance
1818

1919
The .NET cryptography system implements an extensible pattern of derived class inheritance. The hierarchy is as follows:
2020

@@ -26,7 +26,7 @@ The .NET cryptography system implements an extensible pattern of derived class i
2626

2727
This pattern of derived classes lets you add a new algorithm or a new implementation of an existing algorithm. For example, to create a new public-key algorithm, you would inherit from the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class. To create a new implementation of a specific algorithm, you would create a non-abstract derived class of that algorithm.
2828

29-
## How Algorithms Are Implemented in .NET
29+
## How algorithms are implemented in .NET
3030

3131
As an example of the different implementations available for an algorithm, consider symmetric algorithms. The base for all symmetric algorithms is <xref:System.Security.Cryptography.SymmetricAlgorithm>, which is inherited by <xref:System.Security.Cryptography.Aes>, <xref:System.Security.Cryptography.TripleDES>, and others that are no longer recommended.
3232

@@ -42,14 +42,14 @@ In .NET Core and .NET 5 and later versions, all implementation classes (`*Crypto
4242

4343
In most cases, you don't need to directly reference an algorithm implementation class, such as `AesCryptoServiceProvider`. The methods and properties you typically need are on the base algorithm class, such as `Aes`. Create an instance of a default implementation class by using a factory method on the base algorithm class, and refer to the base algorithm class. For example, see the highlighted line of code in the following example:
4444

45-
:::code language="csharp" source="snippets/encrypting-data/csharp/aes-encrypt.cs" highlight="16":::
46-
:::code language="vb" source="snippets/encrypting-data/vb/aes-encrypt.vb" highlight="12":::
45+
:::code language="csharp" source="snippets/encrypting-data/csharp/aes-encrypt.cs" highlight="20":::
46+
:::code language="vb" source="snippets/encrypting-data/vb/aes-encrypt.vb" highlight="17":::
4747

48-
## Cryptographic Configuration
48+
## Cryptographic configuration
4949

5050
Cryptographic configuration lets you resolve a specific implementation of an algorithm to an algorithm name, allowing extensibility of the .NET cryptography classes. You can add your own hardware or software implementation of an algorithm and map the implementation to the algorithm name of your choice. If an algorithm is not specified in the configuration file, the default settings are used.
5151

52-
## Choosing an Algorithm
52+
## Choose an algorithm
5353

5454
You can select an algorithm for different reasons: for example, for data integrity, for data privacy, or to generate a key. Symmetric and hash algorithms are intended for protecting data for either integrity reasons (protect from change) or privacy reasons (protect from viewing). Hash algorithms are used primarily for data integrity.
5555

0 commit comments

Comments
 (0)