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

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

RSACryptoServiceProvider.ExportParameters メソッド

RSAParameters をエクスポートます。

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

Public Overrides Function
 ExportParameters ( _
    includePrivateParameters As Boolean _
) As RSAParameters
Dim instance As RSACryptoServiceProvider
Dim includePrivateParameters As Boolean
Dim returnValue As RSAParameters

returnValue = instance.ExportParameters(includePrivateParameters)
public override RSAParameters ExportParameters (
    bool includePrivateParameters
)
public:
virtual RSAParameters ExportParameters (
    bool includePrivateParameters
) override
public RSAParameters ExportParameters (
    boolean includePrivateParameters
)
public override function ExportParameters (
    includePrivateParameters : boolean
) : RSAParameters

パラメータ

includePrivateParameters

プライベート パラメータ含め場合trueそれ以外場合false

戻り値
RSAパラメータ

例外例外
例外種類条件

CryptographicException

キーエクスポートできません。

使用例使用例

RSACryptoServiceProvider を使用して作成したキー情報RSAParameters オブジェクトエクスポートするコード例次に示します

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)


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);


}
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 );
}
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);
}
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 名前空間
その他の技術情報
暗号サービス



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS