CryptoConfig.AddAlgorithm(Type, String[]) 方法
本文内容
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将一组名称添加到要用于当前应用程序域的算法映射。
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[]
要映射到该算法的名称的数组。
- 属性
algorithm
或 names
参数为 null
。
指定的映射优先于内置映射和 machine.config 文件中的映射。 映射用于防止部分信任代码使用受信任的加密操作。
适用于
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |