DSACryptoServiceProvider.ImportParameters メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DSACryptoServiceProvider.ImportParameters メソッドの意味・解説 

DSACryptoServiceProvider.ImportParameters メソッド

指定した DSAParameters をインポートます。

名前空間: System.Security.Cryptography
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overrides Sub ImportParameters
 ( _
    parameters As DSAParameters _
)
Dim instance As DSACryptoServiceProvider
Dim parameters As DSAParameters

instance.ImportParameters(parameters)
public override void ImportParameters (
    DSAParameters parameters
)
public:
virtual void ImportParameters (
    DSAParameters parameters
) override
public void ImportParameters (
    DSAParameters parameters
)
public override function ImportParameters (
    parameters : DSAParameters
)

パラメータ

parameters

DSAパラメータ

例外例外
例外種類条件

CryptographicException

暗号サービス プロバイダ (CSP) を取得できません。

または

parameters パラメータ欠落しているフィールドあります

使用例使用例

DSAParameters オブジェクトから DSACryptoServiceProvider オブジェクトキー情報インポートするコード例次に示します

Try
    'Create a new DSACryptoServiceProvider object. 
    Dim DSA As New DSACryptoServiceProvider()

    'Export the key information to a DSAParameters object.
    'Pass false to export the public key information or pass
    'true to export public and private key information.
    Dim DSAParams As DSAParameters = DSA.ExportParameters(False)

    'Create another DSACryptoServiceProvider object.
    Dim DSA2 As New DSACryptoServiceProvider()

    'Import the the key information from the other 
    'DSACryptoServiceProvider object.  
    DSA2.ImportParameters(DSAParams)


Catch e As CryptographicException
    'Catch this exception in case the encryption did
    'not succeed.
    Console.WriteLine(e.Message)
End Try
try
{
    //Create a new DSACryptoServiceProvider object. 
    DSACryptoServiceProvider DSA = new DSACryptoServiceProvider();

    //Export the key information to a DSAParameters object.
    //Pass false to export the public key information or pass
    //true to export public and private key information.
    DSAParameters DSAParams = DSA.ExportParameters(false);

    //Create another DSACryptoServiceProvider object.
    DSACryptoServiceProvider DSA2 = new DSACryptoServiceProvider();

    //Import the the key information from the other 
    //DSACryptoServiceProvider object.  
    DSA2.ImportParameters(DSAParams);


}
catch(CryptographicException e)
{
    //Catch this exception in case the encryption did
    //not succeed.
    Console.WriteLine(e.Message);

}
try
{
   //Create a new DSACryptoServiceProvider object. 
   DSACryptoServiceProvider^ DSA = gcnew DSACryptoServiceProvider;
   
   //Export the key information to a DSAParameters object.
   //Pass false to export the public key information or pass
   //true to export public and private key information.
   DSAParameters DSAParams = DSA->ExportParameters( false );
   
   //Create another DSACryptoServiceProvider object.
   DSACryptoServiceProvider^ DSA2 = gcnew DSACryptoServiceProvider;
   
   //Import the the key information from the other 
   //DSACryptoServiceProvider Object*.  
   DSA2->ImportParameters( DSAParams );
}
catch ( CryptographicException^ e ) 
{
   //Catch this exception in case the encryption did
   //not succeed.
   Console::WriteLine( e->Message );
}
try {
    // Create a new DSACryptoServiceProvider object. 
    DSACryptoServiceProvider dsa = new DSACryptoServiceProvider();

    // Export the key information to a DSAParameters object.
    // Pass false to export the public key information or pass
    // true to export public and private key information.
    DSAParameters dsaParams = dsa.ExportParameters(false);

    // Create another DSACryptoServiceProvider object.
    DSACryptoServiceProvider dsa2 = new DSACryptoServiceProvider();

    // Import the the key information from the other 
    // DSACryptoServiceProvider object.  
    dsa2.ImportParameters(dsaParams);
}
catch (CryptographicException e) {
    // Catch this exception in case the encryption did
    // not succeed.
    Console.WriteLine(e.get_Message());
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DSACryptoServiceProvider クラス
DSACryptoServiceProvider メンバ
System.Security.Cryptography 名前空間
その他の技術情報
暗号サービス


このページでは「.NET Framework クラス ライブラリ リファレンス」からDSACryptoServiceProvider.ImportParameters メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDSACryptoServiceProvider.ImportParameters メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDSACryptoServiceProvider.ImportParameters メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DSACryptoServiceProvider.ImportParameters メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DSACryptoServiceProvider.ImportParameters メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS