RSACryptoServiceProvider 클래스

정의

CSP(암호화 서비스 공급자)가 제공하는 RSA 알고리즘의 구현을 사용하여 비대칭 암호화 및 암호 해독을 수행합니다. 이 클래스는 상속될 수 없습니다.

public ref class RSACryptoServiceProvider sealed : System::Security::Cryptography::RSA, System::Security::Cryptography::ICspAsymmetricAlgorithm
public ref class RSACryptoServiceProvider sealed : System::Security::Cryptography::RSA
public sealed class RSACryptoServiceProvider : System.Security.Cryptography.RSA, System.Security.Cryptography.ICspAsymmetricAlgorithm
public sealed class RSACryptoServiceProvider : System.Security.Cryptography.RSA
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class RSACryptoServiceProvider : System.Security.Cryptography.RSA, System.Security.Cryptography.ICspAsymmetricAlgorithm
type RSACryptoServiceProvider = class
    inherit RSA
    interface ICspAsymmetricAlgorithm
type RSACryptoServiceProvider = class
    inherit RSA
[<System.Runtime.InteropServices.ComVisible(true)>]
type RSACryptoServiceProvider = class
    inherit RSA
    interface ICspAsymmetricAlgorithm
Public NotInheritable Class RSACryptoServiceProvider
Inherits RSA
Implements ICspAsymmetricAlgorithm
Public NotInheritable Class RSACryptoServiceProvider
Inherits RSA
상속
RSACryptoServiceProvider
특성
구현

예제

다음 코드 예제에서는 클래스를 사용하여 RSACryptoServiceProvider 문자열을 바이트 배열로 암호화한 다음 바이트를 다시 문자열로 해독합니다.

using namespace System;
using namespace System::Security::Cryptography;
using namespace System::Text;
array<Byte>^ RSAEncrypt( array<Byte>^DataToEncrypt, RSAParameters RSAKeyInfo, bool DoOAEPPadding )
{
   try
   {
      
      //Create a new instance of RSACryptoServiceProvider.
      RSACryptoServiceProvider^ RSA = gcnew RSACryptoServiceProvider;
      
      //Import the RSA Key information. This only needs
      //toinclude the public key information.
      RSA->ImportParameters( RSAKeyInfo );
      
      //Encrypt the passed byte array and specify OAEP padding.  
      //OAEP padding is only available on Microsoft Windows XP or
      //later.  

      array<Byte>^encryptedData = RSA->Encrypt( DataToEncrypt, DoOAEPPadding );
      delete RSA;
      return encryptedData;
   }
   //Catch and display a CryptographicException  
   //to the console.
   catch ( CryptographicException^ e ) 
   {
      Console::WriteLine( e->Message );
      return nullptr;
   }

}

array<Byte>^ RSADecrypt( array<Byte>^DataToDecrypt, RSAParameters RSAKeyInfo, bool DoOAEPPadding )
{
   try
   {
      
      //Create a new instance of RSACryptoServiceProvider.
      RSACryptoServiceProvider^ RSA = gcnew RSACryptoServiceProvider;
      
      //Import the RSA Key information. This needs
      //to include the private key information.
      RSA->ImportParameters( RSAKeyInfo );
      
      //Decrypt the passed byte array and specify OAEP padding.  
      //OAEP padding is only available on Microsoft Windows XP or
      //later.  
      
      array<Byte>^decryptedData = RSA->Decrypt( DataToDecrypt, DoOAEPPadding );
      delete RSA;
      return decryptedData;
   }
   //Catch and display a CryptographicException  
   //to the console.
   catch ( CryptographicException^ e ) 
   {
      Console::WriteLine( e );
      return nullptr;
   }

}

int main()
{
   try
   {
      
      //Create a UnicodeEncoder to convert between byte array and string.
      UnicodeEncoding^ ByteConverter = gcnew UnicodeEncoding;
      
      //Create byte arrays to hold original, encrypted, and decrypted data.
      array<Byte>^dataToEncrypt = ByteConverter->GetBytes( "Data to Encrypt" );
      array<Byte>^encryptedData;
      array<Byte>^decryptedData;
      
      //Create a new instance of RSACryptoServiceProvider to generate
      //public and private key data.
      RSACryptoServiceProvider^ RSA = gcnew RSACryptoServiceProvider;
      
      //Pass the data to ENCRYPT, the public key information 
      //(using RSACryptoServiceProvider.ExportParameters(false),
      //and a boolean flag specifying no OAEP padding.
      encryptedData = RSAEncrypt( dataToEncrypt, RSA->ExportParameters( false ), false );
      
      //Pass the data to DECRYPT, the private key information 
      //(using RSACryptoServiceProvider.ExportParameters(true),
      //and a boolean flag specifying no OAEP padding.
      decryptedData = RSADecrypt( encryptedData, RSA->ExportParameters( true ), false );
      
      //Display the decrypted plaintext to the console. 
      Console::WriteLine( "Decrypted plaintext: {0}", ByteConverter->GetString( decryptedData ) );
      delete RSA;
   }
   catch ( ArgumentNullException^ ) 
   {
      
      //Catch this exception in case the encryption did
      //not succeed.
      Console::WriteLine( "Encryption failed." );
   }

}
using System;
using System.Security.Cryptography;
using System.Text;

class RSACSPSample
{

    static void Main()
    {
        try
        {
            //Create a UnicodeEncoder to convert between byte array and string.
            UnicodeEncoding ByteConverter = new UnicodeEncoding();

            //Create byte arrays to hold original, encrypted, and decrypted data.
            byte[] dataToEncrypt = ByteConverter.GetBytes("Data to Encrypt");
            byte[] encryptedData;
            byte[] decryptedData;

            //Create a new instance of RSACryptoServiceProvider to generate
            //public and private key data.
            using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
            {

                //Pass the data to ENCRYPT, the public key information 
                //(using RSACryptoServiceProvider.ExportParameters(false),
                //and a boolean flag specifying no OAEP padding.
                encryptedData = RSAEncrypt(dataToEncrypt, RSA.ExportParameters(false), false);

                //Pass the data to DECRYPT, the private key information 
                //(using RSACryptoServiceProvider.ExportParameters(true),
                //and a boolean flag specifying no OAEP padding.
                decryptedData = RSADecrypt(encryptedData, RSA.ExportParameters(true), false);

                //Display the decrypted plaintext to the console. 
                Console.WriteLine("Decrypted plaintext: {0}", ByteConverter.GetString(decryptedData));
            }
        }
        catch (ArgumentNullException)
        {
            //Catch this exception in case the encryption did
            //not succeed.
            Console.WriteLine("Encryption failed.");
        }
    }

    public static byte[] RSAEncrypt(byte[] DataToEncrypt, RSAParameters RSAKeyInfo, bool DoOAEPPadding)
    {
        try
        {
            byte[] encryptedData;
            //Create a new instance of RSACryptoServiceProvider.
            using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
            {

                //Import the RSA Key information. This only needs
                //to include the public key information.
                RSA.ImportParameters(RSAKeyInfo);

                //Encrypt the passed byte array and specify OAEP padding.  
                //OAEP padding is only available on Microsoft Windows XP or
                //later.  
                encryptedData = RSA.Encrypt(DataToEncrypt, DoOAEPPadding);
            }
            return encryptedData;
        }
        //Catch and display a CryptographicException  
        //to the console.
        catch (CryptographicException e)
        {
            Console.WriteLine(e.Message);

            return null;
        }
    }

    public static byte[] RSADecrypt(byte[] DataToDecrypt, RSAParameters RSAKeyInfo, bool DoOAEPPadding)
    {
        try
        {
            byte[] decryptedData;
            //Create a new instance of RSACryptoServiceProvider.
            using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
            {
                //Import the RSA Key information. This needs
                //to include the private key information.
                RSA.ImportParameters(RSAKeyInfo);

                //Decrypt the passed byte array and specify OAEP padding.  
                //OAEP padding is only available on Microsoft Windows XP or
                //later.  
                decryptedData = RSA.Decrypt(DataToDecrypt, DoOAEPPadding);
            }
            return decryptedData;
        }
        //Catch and display a CryptographicException  
        //to the console.
        catch (CryptographicException e)
        {
            Console.WriteLine(e.ToString());

            return null;
        }
    }
}
Imports System.Security.Cryptography
Imports System.Text

 _

Class RSACSPSample


    Shared Sub Main()
        Try
            'Create a UnicodeEncoder to convert between byte array and string.
            Dim ByteConverter As New UnicodeEncoding()

            'Create byte arrays to hold original, encrypted, and decrypted data.
            Dim dataToEncrypt As Byte() = ByteConverter.GetBytes("Data to Encrypt")
            Dim encryptedData() As Byte
            Dim decryptedData() As Byte

            'Create a new instance of RSACryptoServiceProvider to generate
            'public and private key data.
            Using RSA As New RSACryptoServiceProvider

                'Pass the data to ENCRYPT, the public key information 
                '(using RSACryptoServiceProvider.ExportParameters(false),
                'and a boolean flag specifying no OAEP padding.
                encryptedData = RSAEncrypt(dataToEncrypt, RSA.ExportParameters(False), False)

                'Pass the data to DECRYPT, the private key information 
                '(using RSACryptoServiceProvider.ExportParameters(true),
                'and a boolean flag specifying no OAEP padding.
                decryptedData = RSADecrypt(encryptedData, RSA.ExportParameters(True), False)

                'Display the decrypted plaintext to the console. 
                Console.WriteLine("Decrypted plaintext: {0}", ByteConverter.GetString(decryptedData))
            End Using
        Catch e As ArgumentNullException
            'Catch this exception in case the encryption did
            'not succeed.
            Console.WriteLine("Encryption failed.")
        End Try
    End Sub


    Public Shared Function RSAEncrypt(ByVal DataToEncrypt() As Byte, ByVal RSAKeyInfo As RSAParameters, ByVal DoOAEPPadding As Boolean) As Byte()
        Try
            Dim encryptedData() As Byte
            'Create a new instance of RSACryptoServiceProvider.
            Using RSA As New RSACryptoServiceProvider

                'Import the RSA Key information. This only needs
                'toinclude the public key information.
                RSA.ImportParameters(RSAKeyInfo)

                'Encrypt the passed byte array and specify OAEP padding.  
                'OAEP padding is only available on Microsoft Windows XP or
                'later.  
                encryptedData = RSA.Encrypt(DataToEncrypt, DoOAEPPadding)
            End Using
            Return encryptedData
            'Catch and display a CryptographicException  
            'to the console.
        Catch e As CryptographicException
            Console.WriteLine(e.Message)

            Return Nothing
        End Try
    End Function


    Public Shared Function RSADecrypt(ByVal DataToDecrypt() As Byte, ByVal RSAKeyInfo As RSAParameters, ByVal DoOAEPPadding As Boolean) As Byte()
        Try
            Dim decryptedData() As Byte
            'Create a new instance of RSACryptoServiceProvider.
            Using RSA As New RSACryptoServiceProvider
                'Import the RSA Key information. This needs
                'to include the private key information.
                RSA.ImportParameters(RSAKeyInfo)

                'Decrypt the passed byte array and specify OAEP padding.  
                'OAEP padding is only available on Microsoft Windows XP or
                'later.  
                decryptedData = RSA.Decrypt(DataToDecrypt, DoOAEPPadding)
                'Catch and display a CryptographicException  
                'to the console.
            End Using
            Return decryptedData
        Catch e As CryptographicException
            Console.WriteLine(e.ToString())

            Return Nothing
        End Try
    End Function
End Class

다음 코드 예제에서는 를 사용하여 RSACryptoServiceProvider 만든 키 정보를 개체로 RSAParameters 내보냅니다.

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.
    using (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. 
    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

설명

이 API에 대한 자세한 내용은 RSACryptoServiceProvider에 대한 추가 API 설명을 참조하세요.

생성자

RSACryptoServiceProvider()

임의의 키 쌍을 사용하여 RSACryptoServiceProvider 클래스의 새 인스턴스를 초기화합니다.

RSACryptoServiceProvider(CspParameters)

지정된 매개 변수를 사용하여 RSACryptoServiceProvider 클래스의 새 인스턴스를 초기화합니다.

RSACryptoServiceProvider(Int32)

키 크기가 지정된 임의의 키 쌍으로 RSACryptoServiceProvider 클래스의 새 인스턴스를 초기화합니다.

RSACryptoServiceProvider(Int32, CspParameters)

지정된 키 크기 및 매개 변수를 사용하여 RSACryptoServiceProvider 클래스의 새 인스턴스를 초기화합니다.

필드

KeySizeValue

비대칭 알고리즘에서 사용하는 키 모듈러스의 크기(비트 단위)를 나타냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
LegalKeySizesValue

비대칭 알고리즘에서 지원하는 키 크기를 지정합니다.

(다음에서 상속됨 AsymmetricAlgorithm)

속성

CspKeyContainerInfo

암호화 키 쌍에 대한 추가 정보를 설명하는 CspKeyContainerInfo 개체를 가져옵니다.

KeyExchangeAlgorithm

RSA 구현과 함께 사용 가능한 키 교환 알고리즘의 이름을 가져옵니다.

KeyExchangeAlgorithm

RSA 구현과 함께 사용 가능한 키 교환 알고리즘의 이름을 가져옵니다.

(다음에서 상속됨 RSA)
KeySize

현재 키의 크기를 가져옵니다.

LegalKeySizes

비대칭 알고리즘에서 지원하는 키 크기를 가져옵니다.

LegalKeySizes

비대칭 알고리즘에서 지원하는 키 크기를 가져옵니다.

(다음에서 상속됨 AsymmetricAlgorithm)
PersistKeyInCsp

키를 CSP(암호화 서비스 공급자)에 유지할지 여부를 나타내는 값을 가져오거나 설정합니다.

PublicOnly

RSACryptoServiceProvider 개체에 공용 키만 들어 있는지 여부를 나타내는 값을 가져옵니다.

SignatureAlgorithm

RSA 구현과 함께 사용 가능한 서명 알고리즘의 이름을 가져옵니다.

SignatureAlgorithm

RSA 구현과 함께 사용 가능한 서명 알고리즘의 이름을 가져옵니다.

(다음에서 상속됨 RSA)
UseMachineKeyStore

사용자 프로필 저장소 대신 컴퓨터의 키 저장소에 키를 유지할지 여부를 나타내는 값을 가져오거나 설정합니다.

메서드

Clear()

AsymmetricAlgorithm 클래스에서 사용하는 모든 리소스를 해제합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
Decrypt(Byte[], Boolean)

RSA 알고리즘에 따라 데이터를 해독합니다.

Decrypt(Byte[], RSAEncryptionPadding)

지정한 패딩을 사용하여 이전에 RSA 알고리즘으로 암호화된 데이터의 암호를 해독합니다.

Decrypt(Byte[], RSAEncryptionPadding)

파생 클래스에서 재정의하는 경우 지정된 패딩 모드를 사용하여 입력 데이터를 해독합니다.

(다음에서 상속됨 RSA)
Decrypt(ReadOnlySpan<Byte>, RSAEncryptionPadding)

지정된 패딩 모드를 사용하여 입력 데이터의 암호를 해독합니다.

(다음에서 상속됨 RSA)
Decrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding)

지정된 패딩 모드를 사용하여 입력 데이터의 암호를 해독합니다.

(다음에서 상속됨 RSA)
DecryptValue(Byte[])
사용되지 않음.

이 메서드는 현재 버전에서 지원되지 않습니다.

DecryptValue(Byte[])
사용되지 않음.

파생 클래스에서 재정의하는 경우 프라이빗 키를 사용하여 입력 데이터를 해독합니다.

(다음에서 상속됨 RSA)
Dispose()

AsymmetricAlgorithm 클래스의 현재 인스턴스에서 사용하는 모든 리소스를 해제합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
Dispose(Boolean)

AsymmetricAlgorithm 클래스에 사용되는 관리되지 않는 리소스를 해제하고, 필요에 따라 관리되는 리소스를 해제합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
Encrypt(Byte[], Boolean)

RSA 알고리즘으로 데이터를 암호화합니다.

Encrypt(Byte[], RSAEncryptionPadding)

지정된 패딩을 사용하여 RSA 알고리즘으로 데이터를 암호화합니다.

Encrypt(Byte[], RSAEncryptionPadding)

파생 클래스에서 재정의하는 경우 지정된 패딩 모드를 사용하여 입력 데이터를 암호화합니다.

(다음에서 상속됨 RSA)
Encrypt(ReadOnlySpan<Byte>, RSAEncryptionPadding)

지정된 패딩 모드를 사용하여 입력 데이터를 암호화합니다.

(다음에서 상속됨 RSA)
Encrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding)

지정된 패딩 모드를 사용하여 입력 데이터를 암호화합니다.

(다음에서 상속됨 RSA)
EncryptValue(Byte[])
사용되지 않음.

이 메서드는 현재 버전에서 지원되지 않습니다.

EncryptValue(Byte[])
사용되지 않음.

파생 클래스에서 재정의하는 경우 공개 키를 사용하여 입력 데이터를 암호화합니다.

(다음에서 상속됨 RSA)
Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
ExportCspBlob(Boolean)

RSACryptoServiceProvider 개체와 연결된 키 정보를 포함하는 BLOB을 내보냅니다.

ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters)

바이트 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters)

문자 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters)

PEM 인코딩된 바이트 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters)

PEM 인코딩된 문자 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportParameters(Boolean)

RSAParameters를 내보냅니다.

ExportPkcs8PrivateKey()

PKCS#8 PrivateKeyInfo 형식으로 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportPkcs8PrivateKeyPem()

현재 키를 PKCS#8 PrivateKeyInfo 형식, PEM 인코딩 형식으로 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportRSAPrivateKey()

PKCS#1 RSAPrivateKey 형식으로 현재 키를 내보냅니다.

(다음에서 상속됨 RSA)
ExportRSAPrivateKeyPem()

현재 키를 PKCS#1 RSAPrivateKey 형식( PEM 인코딩)으로 내보냅니다.

(다음에서 상속됨 RSA)
ExportRSAPublicKey()

PKCS#1 RSAPublicKey 형식으로 현재 키의 퍼블릭 키 부분을 내보냅니다.

(다음에서 상속됨 RSA)
ExportRSAPublicKeyPem()

현재 키의 공개 키 부분을 PKCS#1 RSAPublicKey 형식, PEM 인코딩 형식으로 내보냅니다.

(다음에서 상속됨 RSA)
ExportSubjectPublicKeyInfo()

X.509 SubjectPublicKeyInfo 형식으로 된 현재 키의 퍼블릭 키 부분을 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
ExportSubjectPublicKeyInfoPem()

현재 키의 공개 키 부분을 PEM 인코딩된 X.509 SubjectPublicKeyInfo 형식으로 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
Finalize()

이 인스턴스에서 보유한 관리되지 않는 리소스를 해제합니다.

FromXmlString(String)

XML 문자열의 키 정보를 사용하여 RSA 개체를 초기화합니다.

(다음에서 상속됨 RSA)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetMaxOutputSize()

RSA 작업에서 생성할 수 있는 최대 바이트 수를 가져옵니다.

(다음에서 상속됨 RSA)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
HashData(Byte[], Int32, Int32, HashAlgorithmName)

파생 클래스에서 재정의할 때 지정된 해싱 알고리즘을 사용하여 지정된 바이트 배열 부분의 해시 값을 계산합니다.

(다음에서 상속됨 RSA)
HashData(Stream, HashAlgorithmName)

파생 클래스에서 재정의할 때 지정된 해싱 알고리즘을 사용하여 지정된 이진 스트림의 해시 값을 계산합니다.

(다음에서 상속됨 RSA)
ImportCspBlob(Byte[])

RSA 키 정보를 나타내는 blob을 가져옵니다.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

바이트 기반 암호로 해독한 다음 이 개체의 키를 대체하여 PKCS#8 EncryptedPrivateKeyInfo 구조체에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

바이트 기반 암호로 해독한 다음 이 개체의 키를 대체하여 PKCS#8 EncryptedPrivateKeyInfo 구조체에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

(다음에서 상속됨 RSA)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

문자 기반 암호로 해독한 다음 이 개체의 키를 대체하여 PKCS#8 EncryptedPrivateKeyInfo 구조에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

문자 기반 암호로 해독한 다음 이 개체의 키를 대체하여 PKCS#8 EncryptedPrivateKeyInfo 구조에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

(다음에서 상속됨 RSA)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

(다음에서 상속됨 RSA)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

암호화된 RFC 7468 PEM으로 인코딩된 프라이빗 키를 가져와 이 개체의 키를 바꿉니다.

(다음에서 상속됨 RSA)
ImportFromPem(ReadOnlySpan<Char>)

RFC 7468 PEM으로 인코딩된 키를 가져와 이 개체의 키를 바꿉니다.

(다음에서 상속됨 RSA)
ImportParameters(RSAParameters)

지정된 RSAParameters를 가져옵니다.

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

해독한 다음 이 개체의 키를 대체하여 PKCS#8 PrivateKeyInfo 구조에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

(다음에서 상속됨 RSA)
ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32)

해독한 다음 이 개체의 키를 대체하여 PKCS#1 RSAPrivateKey 구조체에서 퍼블릭/프라이빗 키 쌍을 가져옵니다.

(다음에서 상속됨 RSA)
ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32)

해독한 다음 이 개체의 키를 대체하여 PKCS#1 RSAPublicKey 구조체에서 퍼블릭 키를 가져옵니다.

(다음에서 상속됨 RSA)
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

해독한 다음 이 개체의 키를 대체하여 X.509 SubjectPublicKeyInfo 구조에서 퍼블릭 키를 가져옵니다.

(다음에서 상속됨 RSA)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SignData(Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩 모드를 사용하여 지정된 바이트 배열의 해시 값을 계산하고 결과 해시 값을 서명합니다.

(다음에서 상속됨 RSA)
SignData(Byte[], Int32, Int32, HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩 모드를 사용하여 지정된 바이트 배열 일부의 해시 값을 계산하고 결과 해시 값을 서명합니다.

(다음에서 상속됨 RSA)
SignData(Byte[], Int32, Int32, Object)

지정된 해시 알고리즘을 사용하여 지정된 바이트 배열 하위 집합의 해시 값을 계산하고 결과 해시 값을 서명합니다.

SignData(Byte[], Object)

지정된 해시 알고리즘을 사용하여 지정된 바이트 배열의 해시 값을 계산하고 결과 해시 값을 서명합니다.

SignData(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

지정된 데이터의 해시 값을 계산하고 서명합니다.

(다음에서 상속됨 RSA)
SignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding)

지정된 알고리즘을 사용하여 제공된 데이터의 해시를 계산하고 현재 키로 해시에 서명하여 서명을 제공된 버퍼에 기록합니다.

(다음에서 상속됨 RSA)
SignData(Stream, HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩 모드를 사용하여 지정된 스트림의 해시 값을 계산하고 결과 해시 값을 서명합니다.

(다음에서 상속됨 RSA)
SignData(Stream, Object)

지정된 해시 알고리즘을 사용하여 지정된 입력 스트림의 해시 값을 계산하고 결과 해시 값을 서명합니다.

SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 패딩을 사용하여 지정된 해시 값의 서명을 계산합니다.

SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)

파생 클래스에서 재정의할 때 지정된 패딩을 사용하여 지정된 해시 값의 서명을 계산합니다.

(다음에서 상속됨 RSA)
SignHash(Byte[], String)

지정된 해시 값의 서명을 계산합니다.

SignHash(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

지정된 패딩을 사용하여 지정된 해시 값의 서명을 계산합니다.

(다음에서 상속됨 RSA)
SignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding)

현재 키를 사용하여 해시에 서명하고 제공된 버퍼에 서명을 작성합니다.

(다음에서 상속됨 RSA)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
ToXmlString(Boolean)

현재 RSA 개체의 키가 들어 있는 XML 문자열을 만들고 반환합니다.

(다음에서 상속됨 RSA)
TryDecrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32)

지정된 패딩 모드를 사용하여 입력 데이터를 암호 해독하고 그 결과를 지정된 버퍼에 쓰려고 합니다.

(다음에서 상속됨 RSA)
TryEncrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32)

지정된 패딩 모드를 통해 제공된 버퍼로 입력 데이터를 암호화하려고 합니다.

(다음에서 상속됨 RSA)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

바이트 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

문자 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters, Span<Char>, Int32)

PEM 인코딩된 바이트 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보내려고 시도합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters, Span<Char>, Int32)

PEM 인코딩된 문자 기반 암호를 사용하여 PKCS#8 EncryptedPrivateKeyInfo 형식으로 현재 키를 내보냅니다.

(다음에서 상속됨 AsymmetricAlgorithm)
TryExportPkcs8PrivateKey(Span<Byte>, Int32)

PKCS#8 PrivateKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportPkcs8PrivateKeyPem(Span<Char>, Int32)

PEM으로 인코딩된 PKCS#8 PrivateKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
TryExportRSAPrivateKey(Span<Byte>, Int32)

PKCS#1 RSAPrivateKey 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportRSAPrivateKeyPem(Span<Char>, Int32)

PEM으로 인코딩된 PKCS#1 RSAPrivateKey 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportRSAPublicKey(Span<Byte>, Int32)

PKCS#1 RSAPublicKey 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportRSAPublicKeyPem(Span<Char>, Int32)

PEM으로 인코딩된 PKCS#1 RSAPublicKey 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

X.509 SubjectPublicKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 RSA)
TryExportSubjectPublicKeyInfoPem(Span<Char>, Int32)

PEM으로 인코딩된 X.509 SubjectPublicKeyInfo 형식의 현재 키를 제공된 버퍼로 내보내려고 시도합니다.

(다음에서 상속됨 AsymmetricAlgorithm)
TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

지정된 알고리즘을 사용하여 제공된 데이터의 해시를 계산하고 그 결과를 지정된 버퍼에 쓰려고 합니다.

(다음에서 상속됨 RSA)
TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32)

지정된 알고리즘으로 제공된 데이터를 해시하고 현재 키로 해시에 서명하여 제공된 버퍼에 서명을 쓰려고 합니다.

(다음에서 상속됨 RSA)
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32)

현재 키를 통해 해시에 서명하여 제공된 버퍼에 서명을 쓰려고 합니다.

(다음에서 상속됨 RSA)
VerifyData(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용하여 지정된 데이터의 해시 값을 계산한 다음 이 값을 제공된 서명과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘과 패딩을 사용하여 바이트 배열 일부에 있는 데이터의 해시 값을 계산한 다음 이 값을 제공된 서명과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)
VerifyData(Byte[], Object, Byte[])

제공된 공용 키를 사용하여 서명의 해시 값을 판별한 다음 제공된 데이터의 해시 값과 비교하여 디지털 서명이 유효한지 확인합니다.

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용하여 지정된 데이터의 해시 값을 계산한 다음 이 값을 제공된 서명과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)
VerifyData(Stream, Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용하여 지정된 스트림의 해시 값을 계산한 다음 이 값을 제공된 서명과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용해서 시그니처의 해시 값을 확인하고 지정된 해시 값과 비교하여 디지털 시그니처가 유효한지 확인합니다.

VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용하여 서명의 해시 값을 판별한 다음 제공된 해시 값과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)
VerifyHash(Byte[], String, Byte[])

제공된 공용 키를 사용하여 서명의 해시 값을 판별한 다음 제공된 해시 값과 비교하여 디지털 서명이 유효한지 확인합니다.

VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

지정된 해시 알고리즘 및 패딩을 사용하여 서명의 해시 값을 판별한 다음 제공된 해시 값과 비교하여 디지털 서명이 유효한지 확인합니다.

(다음에서 상속됨 RSA)

명시적 인터페이스 구현

IDisposable.Dispose()

이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다.

이 멤버에 대한 설명은 Dispose()를 참조하세요.

(다음에서 상속됨 AsymmetricAlgorithm)

적용 대상

추가 정보