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

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

RSACryptoServiceProvider.ImportParameters メソッド

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

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

Public Overrides Sub ImportParameters
 ( _
    parameters As RSAParameters _
)
Dim instance As RSACryptoServiceProvider
Dim parameters As RSAParameters

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

パラメータ

parameters

RSAパラメータ

例外例外
例外種類条件

CryptographicException

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

または

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

使用例使用例

RSAParameters オブジェクトから作成したキー情報を RSACryptoServiceProvider オブジェクトインポートするコード例次に示します

Try
    'Create a new RSACryptoServiceProvider object. 
    Dim RSA As New RSACryptoServiceProvider()

    'Export the key information to an RSAParameters object.
    'Pass false to export the public key information or pass
    'true to export public and private key information.
    Dim RSAParams As RSAParameters = RSA.ExportParameters(False)

    'Create another RSACryptoServiceProvider object.
    Dim RSA2 As New RSACryptoServiceProvider()

    'Import the the key information from the other 
    'RSACryptoServiceProvider object.  
    RSA2.ImportParameters(RSAParams)


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

    //Export the key information to an RSAParameters object.
    //Pass false to export the public key information or pass
    //true to export public and private key information.
    RSAParameters RSAParams = RSA.ExportParameters(false);

    //Create another RSACryptoServiceProvider object.
    RSACryptoServiceProvider RSA2 = new RSACryptoServiceProvider();

    //Import the the key information from the other 
    //RSACryptoServiceProvider object.  
    RSA2.ImportParameters(RSAParams);


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

}
try
{
   //Create a new RSACryptoServiceProvider object. 
   RSACryptoServiceProvider^ RSA = gcnew RSACryptoServiceProvider;
   
   //Export the key information to an RSAParameters object.
   //Pass false to export the public key information or pass
   //true to export public and private key information.
   RSAParameters RSAParams = RSA->ExportParameters( false );
   
   //Create another RSACryptoServiceProvider object.
   RSACryptoServiceProvider^ RSA2 = gcnew RSACryptoServiceProvider;
   
   //Import the the key information from the other 
   //RSACryptoServiceProvider object.  
   RSA2->ImportParameters( RSAParams );
}
catch ( CryptographicException^ e ) 
{
   //Catch this exception in case the encryption did
   //not succeed.
   Console::WriteLine( e->Message );
}
try {
    // Create a new RSACryptoServiceProvider object. 
    RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();

    // Export the key information to an RSAParameters object.
    // Pass false to export the public key information or pass
    // true to export public and private key information.
    RSAParameters rsaParams = rsa.ExportParameters(false);

    // Create another RSACryptoServiceProvider object.
    RSACryptoServiceProvider rsa2 = new RSACryptoServiceProvider();

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


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS