SignatureDescription.CreateFormatter(AsymmetricAlgorithm) メソッド

定義

AsymmetricSignatureFormatter プロパティを使用して、指定したキーを持つ FormatterAlgorithm インスタンスを作成します。Creates an AsymmetricSignatureFormatter instance with the specified key using the FormatterAlgorithm property.

public:
 virtual System::Security::Cryptography::AsymmetricSignatureFormatter ^ CreateFormatter(System::Security::Cryptography::AsymmetricAlgorithm ^ key);
public virtual System.Security.Cryptography.AsymmetricSignatureFormatter CreateFormatter (System.Security.Cryptography.AsymmetricAlgorithm key);
abstract member CreateFormatter : System.Security.Cryptography.AsymmetricAlgorithm -> System.Security.Cryptography.AsymmetricSignatureFormatter
override this.CreateFormatter : System.Security.Cryptography.AsymmetricAlgorithm -> System.Security.Cryptography.AsymmetricSignatureFormatter
Public Overridable Function CreateFormatter (key As AsymmetricAlgorithm) As AsymmetricSignatureFormatter

パラメーター

key
AsymmetricAlgorithm

AsymmetricSignatureFormatter で使用するキー。The key to use in the AsymmetricSignatureFormatter.

戻り値

新しく作成した AsymmetricSignatureFormatter インスタンス。The newly created AsymmetricSignatureFormatter instance.

次のコード例は、 CreateFormatterメソッドを使用して DSA 暗号化用の署名フォーマッタを作成する方法を示しています。The following code example demonstrates how to use the CreateFormatter method to create a signature formatter for DSA encryption. このコード例は、 SignatureDescriptionクラスに対して提供される大規模な例の一部です。This code example is part of a larger example provided for the SignatureDescription class.

SignatureDescription^ signatureDescription =
   gcnew SignatureDescription;
signatureDescription->FormatterAlgorithm =
   L"System.Security.Cryptography.DSASignatureFormatter";
AsymmetricSignatureFormatter^ asymmetricFormatter =
   signatureDescription->CreateFormatter( dsa );
SignatureDescription signatureDescription = 
    new SignatureDescription();
signatureDescription.FormatterAlgorithm =
    "System.Security.Cryptography.DSASignatureFormatter";

AsymmetricSignatureFormatter asymmetricFormatter =
    signatureDescription.CreateFormatter(dsa);
Dim signatureDescription As New SignatureDescription
signatureDescription.FormatterAlgorithm = _
    "System.Security.Cryptography.DSASignatureFormatter"

Dim asymmetricFormatter As AsymmetricSignatureFormatter
asymmetricFormatter = signatureDescription.CreateFormatter(dsa)

適用対象

こちらもご覧ください