CryptoConfig.AddAlgorithm(Type, String[]) 方法

定義

為當前應用域的演算法映射新增一組名稱。

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

參數

algorithm
Type

要映射的演算法。

names
String[]

一個用來映射到演算法的名稱陣列。

屬性

例外狀況

algorithmnames參數為 null

algorithm 無法從議會外部存取。

-或-

參數中的 names 一個項目為空 null或 。

備註

指定的映射優先於內建映射及 machine.config 檔案中的映射。 這些映射用於防止部分信任程式碼使用受信任的密碼運算。

適用於