RsaSecurityKey.GetAsymmetricAlgorithm(String, Boolean) Метод

Определение

Возвращает указанный алгоритм асимметричного шифрования.

public:
 override System::Security::Cryptography::AsymmetricAlgorithm ^ GetAsymmetricAlgorithm(System::String ^ algorithm, bool requiresPrivateKey);
public override System.Security.Cryptography.AsymmetricAlgorithm GetAsymmetricAlgorithm (string algorithm, bool requiresPrivateKey);
override this.GetAsymmetricAlgorithm : string * bool -> System.Security.Cryptography.AsymmetricAlgorithm
Public Overrides Function GetAsymmetricAlgorithm (algorithm As String, requiresPrivateKey As Boolean) As AsymmetricAlgorithm

Параметры

algorithm
String

Создаваемый асимметричный алгоритм.

requiresPrivateKey
Boolean

Значение true, если для создания алгоритма требуется закрытый ключ; в противном случае — значение false.

Возвращаемое значение

Объект AsymmetricAlgorithm, представляющий указанный алгоритм асимметричного шифрования.

Исключения

Параметр requiresPrivateKeyимеет значение true, и закрытый ключ недоступен.

Применяется к