System.Security.Cryptography.CngAlgorithm Class

Encapsulates the name of an encryption algorithm.

See Also: CngAlgorithm Members

Syntax

public sealed class CngAlgorithm : IEquatable<CngAlgorithm>

Remarks

The System.Security.Cryptography.CngAlgorithm class is a utility class. It consists of static properties, comparison methods, and a private, internally maintained, algorithm name string.

The static properties return System.Security.Cryptography.CngAlgorithm objects. Each object's internal string is initialized to the algorithm name that corresponds to the name of the static property.

You can also use this class to create objects for algorithm types that are not covered by the static properties.

Several Cryptography Next Generation (CNG) classes (such as System.Security.Cryptography.CngKey) accept System.Security.Cryptography.CngAlgorithm objects through an algorithm parameter. When the class receives the System.Security.Cryptography.CngAlgorithm object, it retrieves the embedded algorithm name by calling the object's CngAlgorithm.Algorithm property.

Therefore, System.Security.Cryptography.CngAlgorithm serves as an enumeration of well-known algorithms. It lets you specify a well-known algorithm by using a strongly typed value instead of a string.

Requirements

Namespace: System.Security.Cryptography
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 4.0.0.0