RijndaelManaged クラス

定義

注意事項

The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.

Rijndael アルゴリズムのマネージド バージョンにアクセスします。 このクラスは継承できません。

public ref class RijndaelManaged sealed : System::Security::Cryptography::Rijndael
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public sealed class RijndaelManaged : System.Security.Cryptography.Rijndael
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Obsolete("The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.", DiagnosticId="SYSLIB0022", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class RijndaelManaged : System.Security.Cryptography.Rijndael
public sealed class RijndaelManaged : System.Security.Cryptography.Rijndael
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class RijndaelManaged : System.Security.Cryptography.Rijndael
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type RijndaelManaged = class
    inherit Rijndael
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Obsolete("The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.", DiagnosticId="SYSLIB0022", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type RijndaelManaged = class
    inherit Rijndael
type RijndaelManaged = class
    inherit Rijndael
[<System.Runtime.InteropServices.ComVisible(true)>]
type RijndaelManaged = class
    inherit Rijndael
Public NotInheritable Class RijndaelManaged
Inherits Rijndael
継承
属性

次の例では、 クラスを使用してサンプル データを暗号化および暗号化解除する方法を RijndaelManaged 示します。

#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Security::Cryptography;


class RijndaelMemoryExample
{
public:
    static array<Byte>^ encryptStringToBytes_AES(String^ plainText, array<Byte>^ Key, array<Byte>^ IV)
    {
        // Check arguments.
        if (!plainText || plainText->Length <= 0)
            throw gcnew ArgumentNullException("plainText");
        if (!Key || Key->Length <= 0)
            throw gcnew ArgumentNullException("Key");
        if (!IV  || IV->Length <= 0)
            throw gcnew ArgumentNullException("IV");

        // Declare the streams used
        // to encrypt to an in memory
        // array of bytes.
        MemoryStream^   msEncrypt;
        CryptoStream^   csEncrypt;
        StreamWriter^   swEncrypt;

        // Declare the RijndaelManaged object
        // used to encrypt the data.
        RijndaelManaged^ aesAlg;

        try
        {
            // Create a RijndaelManaged object
            // with the specified key and IV.
            aesAlg = gcnew RijndaelManaged();
            aesAlg->Padding = PaddingMode::PKCS7;
            aesAlg->Key = Key;
            aesAlg->IV = IV;

            // Create an encryptor to perform the stream transform.
            ICryptoTransform^ encryptor = aesAlg->CreateEncryptor(aesAlg->Key, aesAlg->IV);

            // Create the streams used for encryption.
            msEncrypt = gcnew MemoryStream();
            csEncrypt = gcnew CryptoStream(msEncrypt, encryptor, CryptoStreamMode::Write);
            swEncrypt = gcnew StreamWriter(csEncrypt);

            //Write all data to the stream.
            swEncrypt->Write(plainText);
            swEncrypt->Flush();
            csEncrypt->FlushFinalBlock();
            msEncrypt->Flush();
        }
        finally
        {
            // Clean things up.

            // Close the streams.
            if(swEncrypt)
                swEncrypt->Close();
            if (csEncrypt)
                csEncrypt->Close();


            // Clear the RijndaelManaged object.
            if (aesAlg)
                aesAlg->Clear();
        }

        // Return the encrypted bytes from the memory stream.
        return msEncrypt->ToArray();
    }

    static String^ decryptStringFromBytes_AES(array<Byte>^ cipherText, array<Byte>^ Key, array<Byte>^ IV)
    {
        // Check arguments.
        if (!cipherText || cipherText->Length <= 0)
            throw gcnew ArgumentNullException("cipherText");
        if (!Key || Key->Length <= 0)
            throw gcnew ArgumentNullException("Key");
        if (!IV || IV->Length <= 0)
            throw gcnew ArgumentNullException("IV");

        // TDeclare the streams used
        // to decrypt to an in memory
        // array of bytes.
        MemoryStream^ msDecrypt;
        CryptoStream^ csDecrypt;
        StreamReader^ srDecrypt;

        // Declare the RijndaelManaged object
        // used to decrypt the data.
        RijndaelManaged^ aesAlg;

        // Declare the string used to hold
        // the decrypted text.
        String^ plaintext;

        try
        {
            // Create a RijndaelManaged object
            // with the specified key and IV.
            aesAlg = gcnew RijndaelManaged();
            aesAlg->Padding = PaddingMode::PKCS7;
            aesAlg->Key = Key;
            aesAlg->IV = IV;

            // Create a decryptor to perform the stream transform.
            ICryptoTransform^ decryptor = aesAlg->CreateDecryptor(aesAlg->Key, aesAlg->IV);

            // Create the streams used for decryption.
            msDecrypt = gcnew MemoryStream(cipherText);
            csDecrypt = gcnew CryptoStream(msDecrypt, decryptor, CryptoStreamMode::Read);
            srDecrypt = gcnew StreamReader(csDecrypt);

            // Read the decrypted bytes from the decrypting stream
            // and place them in a string.
            plaintext = srDecrypt->ReadToEnd();
        }
        finally
        {
            // Clean things up.

            // Close the streams.
            if (srDecrypt)
                srDecrypt->Close();
            if (csDecrypt)
                csDecrypt->Close();
            if (msDecrypt)
                msDecrypt->Close();

            // Clear the RijndaelManaged object.
            if (aesAlg)
                aesAlg->Clear();
        }

        return plaintext;
    }
};

int main()
{
    try
    {
        String^ original = "Here is some data to encrypt!";

        // Create a new instance of the RijndaelManaged
        // class.  This generates a new key and initialization
        // vector (IV).
        RijndaelManaged^ myRijndael = gcnew RijndaelManaged();

        // Encrypt the string to an array of bytes.
        array<Byte>^ encrypted = RijndaelMemoryExample::encryptStringToBytes_AES(original, myRijndael->Key, myRijndael->IV);

        // Decrypt the bytes to a string.
        String^ roundtrip = RijndaelMemoryExample::decryptStringFromBytes_AES(encrypted, myRijndael->Key, myRijndael->IV);

        //Display the original data and the decrypted data.
        Console::WriteLine("Original:   {0}", original);
        Console::WriteLine("Round Trip: {0}", roundtrip);
    }
    catch (Exception^ e)
    {
        Console::WriteLine("Error: {0}", e->Message);
    }

    return 0;
}
using System;
using System.IO;
using System.Security.Cryptography;

namespace RijndaelManaged_Example
{
    class RijndaelExample
    {
        public static void Main()
        {
            try
            {

                string original = "Here is some data to encrypt!";

                // Create a new instance of the RijndaelManaged
                // class.  This generates a new key and initialization
                // vector (IV).
                using (RijndaelManaged myRijndael = new RijndaelManaged())
                {

                    myRijndael.GenerateKey();
                    myRijndael.GenerateIV();
                    // Encrypt the string to an array of bytes.
                    byte[] encrypted = EncryptStringToBytes(original, myRijndael.Key, myRijndael.IV);

                    // Decrypt the bytes to a string.
                    string roundtrip = DecryptStringFromBytes(encrypted, myRijndael.Key, myRijndael.IV);

                    //Display the original data and the decrypted data.
                    Console.WriteLine("Original:   {0}", original);
                    Console.WriteLine("Round Trip: {0}", roundtrip);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Error: {0}", e.Message);
            }
        }
        static byte[] EncryptStringToBytes(string plainText, byte[] Key, byte[] IV)
        {
            // Check arguments.
            if (plainText == null || plainText.Length <= 0)
                throw new ArgumentNullException("plainText");
            if (Key == null || Key.Length <= 0)
                throw new ArgumentNullException("Key");
            if (IV == null || IV.Length <= 0)
                throw new ArgumentNullException("IV");
            byte[] encrypted;
            // Create an RijndaelManaged object
            // with the specified key and IV.
            using (RijndaelManaged rijAlg = new RijndaelManaged())
            {
                rijAlg.Key = Key;
                rijAlg.IV = IV;

                // Create an encryptor to perform the stream transform.
                ICryptoTransform encryptor = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV);

                // Create the streams used for encryption.
                using (MemoryStream msEncrypt = new MemoryStream())
                {
                    using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
                    {
                        using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
                        {

                            //Write all data to the stream.
                            swEncrypt.Write(plainText);
                        }
                        encrypted = msEncrypt.ToArray();
                    }
                }
            }

            // Return the encrypted bytes from the memory stream.
            return encrypted;
        }

        static string DecryptStringFromBytes(byte[] cipherText, byte[] Key, byte[] IV)
        {
            // Check arguments.
            if (cipherText == null || cipherText.Length <= 0)
                throw new ArgumentNullException("cipherText");
            if (Key == null || Key.Length <= 0)
                throw new ArgumentNullException("Key");
            if (IV == null || IV.Length <= 0)
                throw new ArgumentNullException("IV");

            // Declare the string used to hold
            // the decrypted text.
            string plaintext = null;

            // Create an RijndaelManaged object
            // with the specified key and IV.
            using (RijndaelManaged rijAlg = new RijndaelManaged())
            {
                rijAlg.Key = Key;
                rijAlg.IV = IV;

                // Create a decryptor to perform the stream transform.
                ICryptoTransform decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);

                // Create the streams used for decryption.
                using (MemoryStream msDecrypt = new MemoryStream(cipherText))
                {
                    using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
                    {
                        using (StreamReader srDecrypt = new StreamReader(csDecrypt))
                        {
                            // Read the decrypted bytes from the decrypting stream
                            // and place them in a string.
                            plaintext = srDecrypt.ReadToEnd();
                        }
                    }
                }
            }

            return plaintext;
        }
    }
}
Imports System.IO
Imports System.Security.Cryptography



Class RijndaelExample

    Public Shared Sub Main()
        Try

            Dim original As String = "Here is some data to encrypt!"

            ' Create a new instance of the RijndaelManaged
            ' class.  This generates a new key and initialization 
            ' vector (IV).
            Using myRijndael As New RijndaelManaged()
            
                myRijndael.GenerateKey()
                myRijndael.GenerateIV()

                ' Encrypt the string to an array of bytes.
                Dim encrypted As Byte() = EncryptStringToBytes(original, myRijndael.Key, myRijndael.IV)

                ' Decrypt the bytes to a string.
                Dim roundtrip As String = DecryptStringFromBytes(encrypted, myRijndael.Key, myRijndael.IV)

                'Display the original data and the decrypted data.
                Console.WriteLine("Original:   {0}", original)
                Console.WriteLine("Round Trip: {0}", roundtrip)
            End Using
        Catch e As Exception
            Console.WriteLine("Error: {0}", e.Message)
        End Try

    End Sub

    Shared Function EncryptStringToBytes(ByVal plainText As String, ByVal Key() As Byte, ByVal IV() As Byte) As Byte()
        ' Check arguments.
        If plainText Is Nothing OrElse plainText.Length <= 0 Then
            Throw New ArgumentNullException("plainText")
        End If
        If Key Is Nothing OrElse Key.Length <= 0 Then
            Throw New ArgumentNullException("Key")
        End If
        If IV Is Nothing OrElse IV.Length <= 0 Then
            Throw New ArgumentNullException("IV")
        End If
        Dim encrypted() As Byte
        
        ' Create an RijndaelManaged object
        ' with the specified key and IV.
        Using rijAlg As New RijndaelManaged()

            rijAlg.Key = Key
            rijAlg.IV = IV

            ' Create an encryptor to perform the stream transform.
            Dim encryptor As ICryptoTransform = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV)
            ' Create the streams used for encryption.
            Using msEncrypt As New MemoryStream()
                Using csEncrypt As New CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write)
                    Using swEncrypt As New StreamWriter(csEncrypt)
                        'Write all data to the stream.
                        swEncrypt.Write(plainText)
                    End Using
                    encrypted = msEncrypt.ToArray()
                End Using
            End Using
        End Using

        ' Return the encrypted bytes from the memory stream.
        Return encrypted

    End Function 'EncryptStringToBytes

    Shared Function DecryptStringFromBytes(ByVal cipherText() As Byte, ByVal Key() As Byte, ByVal IV() As Byte) As String
        ' Check arguments.
        If cipherText Is Nothing OrElse cipherText.Length <= 0 Then
            Throw New ArgumentNullException("cipherText")
        End If
        If Key Is Nothing OrElse Key.Length <= 0 Then
            Throw New ArgumentNullException("Key")
        End If
        If IV Is Nothing OrElse IV.Length <= 0 Then
            Throw New ArgumentNullException("IV")
        End If
        ' Declare the string used to hold
        ' the decrypted text.
        Dim plaintext As String = Nothing

        ' Create an RijndaelManaged object
        ' with the specified key and IV.
        Using rijAlg As New RijndaelManaged
            rijAlg.Key = Key
            rijAlg.IV = IV

            ' Create a decryptor to perform the stream transform.
            Dim decryptor As ICryptoTransform = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV)

            ' Create the streams used for decryption.
            Using msDecrypt As New MemoryStream(cipherText)

                Using csDecrypt As New CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)

                    Using srDecrypt As New StreamReader(csDecrypt)


                        ' Read the decrypted bytes from the decrypting stream
                        ' and place them in a string.
                        plaintext = srDecrypt.ReadToEnd()
                    End Using
                End Using
            End Using
        End Using

        Return plaintext

    End Function 'DecryptStringFromBytes 
End Class

注釈

このアルゴリズムでは、128 ビット、192 ビット、または 256 ビットのキー長がサポートされます。既定では 256 ビットです。 .NET Frameworkでは、このアルゴリズムでは、128 ビット、192 ビット、または 256 ビットのブロック サイズがサポートされています。既定値は 128 ビット (Aes互換) です。 .NET Core では、AES と同じであり、128 ビットのブロック サイズのみをサポートします。

重要

クラスは Rijndael 、アルゴリズムの Aes 先行タスクです。 の代わりに RijndaelアルゴリズムをAes使用する必要があります。 詳細については、.NET セキュリティ ブログの「 Rijndael と AES の相違点 」のエントリを参照してください。

コンストラクター

RijndaelManaged()
古い.

RijndaelManaged クラスの新しいインスタンスを初期化します。

フィールド

BlockSizeValue
古い.

暗号操作のブロック サイズをビット単位で表します。

(継承元 SymmetricAlgorithm)
FeedbackSizeValue
古い.

暗号操作のフィードバック サイズをビット単位で表します。

(継承元 SymmetricAlgorithm)
IVValue
古い.

対称アルゴリズムで使用する初期化ベクター (IV) を表します。

(継承元 SymmetricAlgorithm)
KeySizeValue
古い.

対称アルゴリズムで使用する共有キーのサイズをビット単位で表します。

(継承元 SymmetricAlgorithm)
KeyValue
古い.

対称アルゴリズムの共有キーを表します。

(継承元 SymmetricAlgorithm)
LegalBlockSizesValue
古い.

対称アルゴリズムでサポートされているブロック サイズをビット単位で指定します。

(継承元 SymmetricAlgorithm)
LegalKeySizesValue
古い.

対称アルゴリズムでサポートされているキー サイズをビット単位で指定します。

(継承元 SymmetricAlgorithm)
ModeValue
古い.

対称アルゴリズムで使用する暗号モードを表します。

(継承元 SymmetricAlgorithm)
PaddingValue
古い.

対称アルゴリズムで使用する埋め込みモードを表します。

(継承元 SymmetricAlgorithm)

プロパティ

BlockSize
古い.

暗号操作のブロック サイズをビット単位で取得または設定します。

BlockSize
古い.

暗号操作のブロック サイズをビット単位で取得または設定します。

(継承元 SymmetricAlgorithm)
FeedbackSize
古い.

暗号フィードバック (CFB) および出力フィードバック (OFB) の暗号モードにおける暗号化操作のフィードバック サイズをビット単位で取得または設定します。

FeedbackSize
古い.

暗号フィードバック (CFB) および出力フィードバック (OFB) の暗号モードにおける暗号化操作のフィードバック サイズをビット単位で取得または設定します。

(継承元 SymmetricAlgorithm)
IV
古い.

対称アルゴリズムで使用する初期化ベクター (IV: Initialization Vector) を取得または設定します。

IV
古い.

対称アルゴリズムの初期化ベクター (IV) を取得または設定します。

(継承元 SymmetricAlgorithm)
Key
古い.

対称アルゴリズムで使用する共有キーを取得または設定します。

Key
古い.

対称アルゴリズムの共有キーを取得または設定します。

(継承元 SymmetricAlgorithm)
KeySize
古い.

対称アルゴリズムで使用する共有キーのサイズ (ビット単位) を取得または設定します。

KeySize
古い.

対称アルゴリズムで使用する共有キーのサイズをビット単位で取得または設定します。

(継承元 SymmetricAlgorithm)
LegalBlockSizes
古い.

対称アルゴリズムでサポートされているブロック サイズをビット単位で取得します。

(継承元 SymmetricAlgorithm)
LegalKeySizes
古い.

対称アルゴリズムでサポートされているキー サイズをビット単位で取得します。

LegalKeySizes
古い.

対称アルゴリズムでサポートされているキー サイズをビット単位で取得します。

(継承元 SymmetricAlgorithm)
Mode
古い.

対称アルゴリズムの操作モードを取得または設定します。

Mode
古い.

対称アルゴリズムの操作モードを取得または設定します。

(継承元 SymmetricAlgorithm)
Padding
古い.

対称アルゴリズムで使用する埋め込みモードを取得または設定します。

Padding
古い.

対称アルゴリズムで使用する埋め込みモードを取得または設定します。

(継承元 SymmetricAlgorithm)

メソッド

Clear()
古い.

SymmetricAlgorithm クラスによって使用されているすべてのリソースを解放します。

(継承元 SymmetricAlgorithm)
CreateDecryptor()
古い.

現在の Key プロパティおよび初期化ベクター (IV) を使用して、対称復号化オブジェクトを作成します。

CreateDecryptor()
古い.

現在の Key プロパティおよび初期化ベクター (IV) を使用して、対称復号化オブジェクトを作成します。

(継承元 SymmetricAlgorithm)
CreateDecryptor(Byte[], Byte[])
古い.

指定した Rijndael および初期化ベクター (Key) を使用して、対称 IV 復号化オブジェクトを作成します。

CreateEncryptor()
古い.

現在の Key プロパティおよび初期化ベクター (IV) を使用して、対称暗号化オブジェクトを作成します。

CreateEncryptor()
古い.

現在の Key プロパティおよび初期化ベクター (IV) を使用して、対称暗号化オブジェクトを作成します。

(継承元 SymmetricAlgorithm)
CreateEncryptor(Byte[], Byte[])
古い.

指定した Rijndael および初期化ベクター (Key) を使用して、対称 IV 暗号化オブジェクトを作成します。

DecryptCbc(Byte[], Byte[], PaddingMode)
古い.

指定したパディング モードで CBC モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode)
古い.

指定したパディング モードで CBC モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
古い.

指定したパディング モードで CBC モードを使用して、指定したバッファーにデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptCfb(Byte[], Byte[], PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズで CFB モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズで CFB モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

指定されたパディング モードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptEcb(Byte[], PaddingMode)
古い.

指定したパディング モードで ECB モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptEcb(ReadOnlySpan<Byte>, PaddingMode)
古い.

指定したパディング モードで ECB モードを使用してデータを復号化します。

(継承元 SymmetricAlgorithm)
DecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
古い.

指定したパディング モードで ECB モードを使用して、指定したバッファーにデータを復号化します。

(継承元 SymmetricAlgorithm)
Dispose()
古い.

SymmetricAlgorithm クラスの現在のインスタンスによって使用されているすべてのリソースを解放します。

(継承元 SymmetricAlgorithm)
Dispose(Boolean)
古い.

SymmetricAlgorithm によって使用されているアンマネージド リソースを解放し、オプションでマネージド リソースも解放します。

(継承元 SymmetricAlgorithm)
EncryptCbc(Byte[], Byte[], PaddingMode)
古い.

指定したパディング モードで CBC モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode)
古い.

指定したパディング モードで CBC モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
古い.

指定したパディング モードの CBC モードを使用して、指定したバッファーにデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptCfb(Byte[], Byte[], PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズで CFB モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズで CFB モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptEcb(Byte[], PaddingMode)
古い.

指定したパディング モードで ECB モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptEcb(ReadOnlySpan<Byte>, PaddingMode)
古い.

指定したパディング モードで ECB モードを使用してデータを暗号化します。

(継承元 SymmetricAlgorithm)
EncryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
古い.

指定したパディング モードで ECB モードを使用して、指定したバッファーにデータを暗号化します。

(継承元 SymmetricAlgorithm)
Equals(Object)
古い.

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GenerateIV()
古い.

アルゴリズムで使用するランダムな初期化ベクター (IV) を生成します。

GenerateKey()
古い.

アルゴリズムで使用するランダムな Key を生成します。

GetCiphertextLengthCbc(Int32, PaddingMode)
古い.

指定された埋め込みモードと CBC モードのプレーンテキスト長を持つ暗号テキストの長さを取得します。

(継承元 SymmetricAlgorithm)
GetCiphertextLengthCfb(Int32, PaddingMode, Int32)
古い.

指定された埋め込みモードと CFB モードのプレーンテキスト長を持つ暗号テキストの長さを取得します。

(継承元 SymmetricAlgorithm)
GetCiphertextLengthEcb(Int32, PaddingMode)
古い.

指定されたパディング モードと ECB モードのプレーンテキスト長を持つ暗号テキストの長さを取得します。

(継承元 SymmetricAlgorithm)
GetHashCode()
古い.

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()
古い.

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()
古い.

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()
古い.

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
TryDecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode)
古い.

指定したパディング モードで CBC モードを使用して、指定したバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryDecryptCbcCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

派生クラスでオーバーライドされると、指定した埋め込みモードで CBC モードを使用して、指定されたバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryDecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32)
古い.

派生クラスでオーバーライドされると、指定された埋め込みモードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryDecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

指定したパディング モードで ECB モードを使用して、指定したバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryDecryptEcbCore(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

派生クラスでオーバーライドされると、指定した埋め込みモードで ECB モードを使用して、指定されたバッファーにデータの暗号化を解除しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode)
古い.

指定したパディング モードで CBC モードを使用して、指定したバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptCbcCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

派生クラスでオーバーライドされると、指定した埋め込みモードで CBC モードを使用して、指定したバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode, Int32)
古い.

指定された埋め込みモードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32)
古い.

派生クラスでオーバーライドされると、指定された埋め込みモードとフィードバック サイズを持つ CFB モードを使用して、指定されたバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

指定したパディング モードで ECB モードを使用して、指定したバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
TryEncryptEcbCore(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
古い.

派生クラスでオーバーライドされると、指定したパディング モードで ECB モードを使用して、指定したバッファーにデータを暗号化しようとします。

(継承元 SymmetricAlgorithm)
ValidKeySize(Int32)
古い.

指定されたキー サイズが、現在のアルゴリズムに対して有効かどうかを判断します。

(継承元 SymmetricAlgorithm)

明示的なインターフェイスの実装

IDisposable.Dispose()

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

古い.

SymmetricAlgorithm によって使用されているアンマネージド リソースを解放し、オプションでマネージド リソースも解放します。

(継承元 SymmetricAlgorithm)

適用対象

こちらもご覧ください