Прочетете на английски Редактиране

Споделяне чрез


RsaSecurityKey.GetAsymmetricAlgorithm(String, Boolean) Method

Definition

Gets the specified asymmetric cryptographic algorithm.

public override System.Security.Cryptography.AsymmetricAlgorithm GetAsymmetricAlgorithm (string algorithm, bool requiresPrivateKey);

Parameters

algorithm
String

The asymmetric algorithm to create.

requiresPrivateKey
Boolean

true when a private key is required to create the algorithm; otherwise, false.

Returns

An AsymmetricAlgorithm that represents the specified asymmetric cryptographic algorithm.

Exceptions

requiresPrivateKey is true and a private key is not available.

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 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