CryptoConfig.AddAlgorithm(Type, String[]) Method

Definition

Adds a set of names to algorithm mappings to be used for the current application domain.

public:
 static void AddAlgorithm(Type ^ algorithm, ... cli::array <System::String ^> ^ names);
[System.Security.SecurityCritical]
public static void AddAlgorithm (Type algorithm, params string[] names);
static member AddAlgorithm : Type * string[] -> unit
Public Shared Sub AddAlgorithm (algorithm As Type, ParamArray names As String())

Parameters

algorithm
Type

The algorithm to map to.

names
String[]

An array of names to map to the algorithm.

Attributes

Exceptions

The algorithm or names parameter is null.

algorithm cannot be accessed from outside the assembly.

-or-

One of the entries in the names parameter is empty or null.

Remarks

The specified mappings take precedence over the built-in mappings and the mappings in the machine.config file. The mappings are used to prevent partially trust code from using trusted cryptographic operations.

Security

SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to