AesCryptoServiceProvider Klasa

Definicja

Przestroga

Derived cryptographic types are obsolete. Use the Create method on the base type instead.

Wykonuje szyfrowanie symetryczne i odszyfrowywanie przy użyciu implementacji kryptograficznych interfejsów programowania aplikacji (CAPI) algorytmu AES (Advanced Encryption Standard).

public ref class AesCryptoServiceProvider sealed : System::Security::Cryptography::Aes
public sealed class AesCryptoServiceProvider : System.Security.Cryptography.Aes
[System.Obsolete("Derived cryptographic types are obsolete. Use the Create method on the base type instead.", DiagnosticId="SYSLIB0021", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class AesCryptoServiceProvider : System.Security.Cryptography.Aes
type AesCryptoServiceProvider = class
    inherit Aes
[<System.Obsolete("Derived cryptographic types are obsolete. Use the Create method on the base type instead.", DiagnosticId="SYSLIB0021", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type AesCryptoServiceProvider = class
    inherit Aes
Public NotInheritable Class AesCryptoServiceProvider
Inherits Aes
Dziedziczenie
AesCryptoServiceProvider
Atrybuty

Przykłady

W poniższym przykładzie pokazano, jak szyfrować i odszyfrowywać przykładowe dane przy użyciu AesCryptoServiceProvider klasy .

using System;
using System.IO;
using System.Security.Cryptography;

namespace Aes_Example
{
    class AesExample
    {
        public static void Main()
        {
            string original = "Here is some data to encrypt!";

            // Create a new instance of the AesCryptoServiceProvider
            // class.  This generates a new key and initialization
            // vector (IV).
            using (AesCryptoServiceProvider myAes = new AesCryptoServiceProvider())
            {
                // Encrypt the string to an array of bytes.
                byte[] encrypted = EncryptStringToBytes_Aes(original, myAes.Key, myAes.IV);

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

                //Display the original data and the decrypted data.
                Console.WriteLine("Original:   {0}", original);
                Console.WriteLine("Round Trip: {0}", roundtrip);
            }
        }
        static byte[] EncryptStringToBytes_Aes(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 AesCryptoServiceProvider object
            // with the specified key and IV.
            using (AesCryptoServiceProvider aesAlg = new AesCryptoServiceProvider())
            {
                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.
                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_Aes(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 AesCryptoServiceProvider object
            // with the specified key and IV.
            using (AesCryptoServiceProvider aesAlg = new AesCryptoServiceProvider())
            {
                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.
                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 AesExample

    Public Shared Sub Main()
        Dim original As String = "Here is some data to encrypt!"

        ' Create a new instance of the AesCryptoServiceProvider
        ' class.  This generates a new key and initialization 
        ' vector (IV).
        Using myAes As New AesCryptoServiceProvider()

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

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

            'Display the original data and the decrypted data.
            Console.WriteLine("Original:   {0}", original)
            Console.WriteLine("Round Trip: {0}", roundtrip)
        End Using

    End Sub

    Shared Function EncryptStringToBytes_Aes(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 AesCryptoServiceProvider object
        ' with the specified key and IV.
        Using aesAlg As New AesCryptoServiceProvider()

            aesAlg.Key = Key
            aesAlg.IV = IV

            ' Create an encryptor to perform the stream transform.
            Dim encryptor As ICryptoTransform = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV)

            ' Create the streams used for encryption.
            Dim 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

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

    End Function 'EncryptStringToBytes_Aes

    Shared Function DecryptStringFromBytes_Aes(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 AesCryptoServiceProvider object
        ' with the specified key and IV.
        Using aesAlg As New AesCryptoServiceProvider()

            aesAlg.Key = Key
            aesAlg.IV = IV

            ' Create a decryptor to perform the stream transform.
            Dim decryptor As ICryptoTransform = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.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_Aes 
End Class
open System
open System.IO
open System.Security.Cryptography

let encryptStringToBytes_Aes (plainText: string, key : byte[], iv : byte[]) : byte[] =

    // Check arguments.
    if (isNull plainText || plainText.Length <= 0) then nullArg "plainText"
    if (isNull key || key.Length <= 0) then nullArg "key"
    if (isNull iv || iv.Length <= 0) then nullArg "iv"
    
    // Create an AesCryptoServiceProvider object
    // with the specified key and IV.
    use aesAlg = new AesCryptoServiceProvider()
    aesAlg.Key <- key
    aesAlg.IV <- iv

    // Create an encryptor to perform the stream transform.
    let encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV)

    // Create the streams used for encryption.
    use msEncrypt = new MemoryStream()
    use csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write)
    use swEncrypt = new StreamWriter(csEncrypt)
    
    //Write all data to the stream.
    swEncrypt.Write(plainText)
    swEncrypt.Flush()
    
    // Return the encrypted bytes from the memory stream.
    msEncrypt.ToArray()

let decryptStringFromBytes_Aes (cipherText : byte[], key : byte[], iv : byte[]) : string =

    // Check arguments.
    if (isNull cipherText || cipherText.Length <= 0) then nullArg "cipherText"
    if (isNull key || key.Length <= 0) then nullArg "key"
    if (isNull iv || iv.Length <= 0) then nullArg "iv"

    // Create an AesCryptoServiceProvider object
    // with the specified key and IV.
    use aesAlg = new AesCryptoServiceProvider()
    aesAlg.Key <- key
    aesAlg.IV <- iv

    // Create a decryptor to perform the stream transform.
    let decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV)

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

    // Read the decrypted bytes from the decrypting stream
    // and return the resulting string.
    srDecrypt.ReadToEnd()

[<EntryPoint>]
let main argv = 

    let original = "Here is some data to encrypt!"

    // Create a new instance of the AesCryptoServiceProvider
    // class.  This generates a new key and initialization 
    // vector (IV).
    use myAes = new AesCryptoServiceProvider()

    // Encrypt the string to an array of bytes.
    let encrypted = encryptStringToBytes_Aes(original, myAes.Key, myAes.IV)

    // Decrypt the bytes to a string.
    let roundtrip = decryptStringFromBytes_Aes(encrypted, myAes.Key, myAes.IV)

    //Display the original data and the decrypted data.
    Console.WriteLine("Original:   {0}", original)
    Console.WriteLine("Round Trip: {0}", roundtrip)
    0

Konstruktory

AesCryptoServiceProvider()
Przestarzałe.

Inicjuje nowe wystąpienie klasy AesCryptoServiceProvider.

Pola

BlockSizeValue
Przestarzałe.

Reprezentuje rozmiar bloku w bitach operacji kryptograficznych.

(Odziedziczone po SymmetricAlgorithm)
FeedbackSizeValue
Przestarzałe.

Reprezentuje rozmiar opinii w bitach operacji kryptograficznych.

(Odziedziczone po SymmetricAlgorithm)
IVValue
Przestarzałe.

Reprezentuje wektor inicjowania (IV) dla algorytmu symetrycznego.

(Odziedziczone po SymmetricAlgorithm)
KeySizeValue
Przestarzałe.

Reprezentuje rozmiar klucza tajnego używanego przez algorytm symetryczny w bitach.

(Odziedziczone po SymmetricAlgorithm)
KeyValue
Przestarzałe.

Reprezentuje klucz tajny algorytmu symetrycznego.

(Odziedziczone po SymmetricAlgorithm)
LegalBlockSizesValue
Przestarzałe.

Określa rozmiary bloków w bitach, które są obsługiwane przez algorytm symetryczny.

(Odziedziczone po SymmetricAlgorithm)
LegalKeySizesValue
Przestarzałe.

Określa rozmiary kluczy w bitach, które są obsługiwane przez algorytm symetryczny.

(Odziedziczone po SymmetricAlgorithm)
ModeValue
Przestarzałe.

Reprezentuje tryb szyfrowania używany w algorytmie symetrycznym.

(Odziedziczone po SymmetricAlgorithm)
PaddingValue
Przestarzałe.

Reprezentuje tryb uzupełniania używany w algorytmie symetrycznym.

(Odziedziczone po SymmetricAlgorithm)

Właściwości

BlockSize
Przestarzałe.

Pobiera lub ustawia rozmiar bloku w bitach operacji kryptograficznych.

BlockSize
Przestarzałe.

Pobiera lub ustawia rozmiar bloku w bitach operacji kryptograficznych.

(Odziedziczone po SymmetricAlgorithm)
FeedbackSize
Przestarzałe.

Pobiera lub ustawia rozmiar opinii w bitach operacji kryptograficznych dla trybów szyfrowania opinii (CFB) i szyfrowania danych wyjściowych (OFB).

FeedbackSize
Przestarzałe.

Pobiera lub ustawia rozmiar opinii w bitach operacji kryptograficznych dla trybów szyfrowania opinii (CFB) i szyfrowania danych wyjściowych (OFB).

(Odziedziczone po SymmetricAlgorithm)
IV
Przestarzałe.

Pobiera lub ustawia wektor inicjowania (IV) dla algorytmu symetrycznego.

IV
Przestarzałe.

Pobiera lub ustawia wektor inicjowania (IV) dla algorytmu symetrycznego.

(Odziedziczone po SymmetricAlgorithm)
Key
Przestarzałe.

Pobiera lub ustawia klucz symetryczny używany do szyfrowania i odszyfrowywania.

KeySize
Przestarzałe.

Pobiera lub ustawia rozmiar klucza tajnego w bitach.

LegalBlockSizes
Przestarzałe.

Pobiera rozmiary bloków w bitach, które są obsługiwane przez algorytm symetryczny.

LegalBlockSizes
Przestarzałe.

Pobiera rozmiary bloków w bitach, które są obsługiwane przez algorytm symetryczny.

(Odziedziczone po Aes)
LegalKeySizes
Przestarzałe.

Pobiera rozmiary kluczy w bitach, które są obsługiwane przez algorytm symetryczny.

LegalKeySizes
Przestarzałe.

Pobiera rozmiary kluczy w bitach, które są obsługiwane przez algorytm symetryczny.

(Odziedziczone po Aes)
Mode
Przestarzałe.

Pobiera lub ustawia tryb działania algorytmu symetrycznego.

Mode
Przestarzałe.

Pobiera lub ustawia tryb działania algorytmu symetrycznego.

(Odziedziczone po SymmetricAlgorithm)
Padding
Przestarzałe.

Pobiera lub ustawia tryb uzupełniania używany w algorytmie symetrycznym.

Padding
Przestarzałe.

Pobiera lub ustawia tryb uzupełniania używany w algorytmie symetrycznym.

(Odziedziczone po SymmetricAlgorithm)

Metody

Clear()
Przestarzałe.

Zwalnia wszystkie zasoby używane przez klasę SymmetricAlgorithm .

(Odziedziczone po SymmetricAlgorithm)
CreateDecryptor()
Przestarzałe.

Tworzy symetryczny obiekt odszyfrowywania AES przy użyciu bieżącego klucza i wektora inicjowania (IV).

CreateDecryptor(Byte[], Byte[])
Przestarzałe.

Tworzy symetryczny obiekt odszyfrowywania AES przy użyciu określonego klucza i wektora inicjowania (IV).

CreateEncryptor()
Przestarzałe.

Tworzy symetryczny obiekt szyfrujący AES przy użyciu bieżącego klucza i wektora inicjowania (IV).

CreateEncryptor(Byte[], Byte[])
Przestarzałe.

Tworzy obiekt szyfrowania symetrycznego przy użyciu określonego klucza i wektora inicjowania (IV).

DecryptCbc(Byte[], Byte[], PaddingMode)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
DecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
DecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
Przestarzałe.

Odszyfrowuje dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
DecryptCfb(Byte[], Byte[], PaddingMode, Int32)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Odszyfrowuje dane do określonego buforu przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
DecryptEcb(Byte[], PaddingMode)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
DecryptEcb(ReadOnlySpan<Byte>, PaddingMode)
Przestarzałe.

Odszyfrowuje dane przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
DecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
Przestarzałe.

Odszyfrowuje dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
Dispose()
Przestarzałe.

Zwalnia wszystkie zasoby używane przez bieżące wystąpienie klasy SymmetricAlgorithm.

(Odziedziczone po SymmetricAlgorithm)
Dispose(Boolean)
Przestarzałe.

Zwalnia zasoby niezarządzane używane przez element SymmetricAlgorithm i opcjonalnie zwalnia zasoby zarządzane.

(Odziedziczone po SymmetricAlgorithm)
EncryptCbc(Byte[], Byte[], PaddingMode)
Przestarzałe.

Szyfruje dane przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
EncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode)
Przestarzałe.

Szyfruje dane przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
EncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
Przestarzałe.

Szyfruje dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
EncryptCfb(Byte[], Byte[], PaddingMode, Int32)
Przestarzałe.

Szyfruje dane przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
EncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)
Przestarzałe.

Szyfruje dane przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
EncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Szyfruje dane do określonego buforu przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
EncryptEcb(Byte[], PaddingMode)
Przestarzałe.

Szyfruje dane przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
EncryptEcb(ReadOnlySpan<Byte>, PaddingMode)
Przestarzałe.

Szyfruje dane przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
EncryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)
Przestarzałe.

Szyfruje dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
Equals(Object)
Przestarzałe.

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GenerateIV()
Przestarzałe.

Generuje wektor inicjowania losowego (IV) do użycia dla algorytmu.

GenerateKey()
Przestarzałe.

Generuje losowy klucz do użycia dla algorytmu.

GetCiphertextLengthCbc(Int32, PaddingMode)
Przestarzałe.

Pobiera długość szyfrowania tekstu z danym trybem wypełnienia i długością zwykłego tekstu w trybie CBC.

(Odziedziczone po SymmetricAlgorithm)
GetCiphertextLengthCfb(Int32, PaddingMode, Int32)
Przestarzałe.

Pobiera długość szyfrowania tekstu z danym trybem wypełnienia i długością zwykłego tekstu w trybie CFB.

(Odziedziczone po SymmetricAlgorithm)
GetCiphertextLengthEcb(Int32, PaddingMode)
Przestarzałe.

Pobiera długość szyfrowania tekstu z danym trybem wypełnienia i długością zwykłego tekstu w trybie EBC.

(Odziedziczone po SymmetricAlgorithm)
GetHashCode()
Przestarzałe.

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()
Przestarzałe.

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()
Przestarzałe.

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()
Przestarzałe.

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)
TryDecryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode)
Przestarzałe.

Próbuje odszyfrować dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryDecryptCbcCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Po zastąpieniu w klasie pochodnej program próbuje odszyfrować dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryDecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode, Int32)
Przestarzałe.

Próbuje odszyfrować dane do określonego buforu przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32)
Przestarzałe.

Po zastąpieniu w klasie pochodnej próbuje odszyfrować dane do określonego buforu przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
TryDecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Próbuje odszyfrować dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryDecryptEcbCore(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Podczas zastępowania w klasie pochodnej program próbuje odszyfrować dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptCbc(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode)
Przestarzałe.

Próbuje zaszyfrować dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptCbcCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Po zastąpieniu w klasie pochodnej próbuje zaszyfrować dane do określonego buforu przy użyciu trybu CBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32, PaddingMode, Int32)
Przestarzałe.

Próbuje zaszyfrować dane w określonym buforze przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32)
Przestarzałe.

Po zastąpieniu w klasie pochodnej próbuje zaszyfrować dane do określonego buforu przy użyciu trybu CFB z określonym trybem uzupełniania i rozmiarem opinii.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Próbuje zaszyfrować dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
TryEncryptEcbCore(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)
Przestarzałe.

Po zastąpieniu w klasie pochodnej program próbuje zaszyfrować dane do określonego buforu przy użyciu trybu EBC z określonym trybem uzupełniania.

(Odziedziczone po SymmetricAlgorithm)
ValidKeySize(Int32)
Przestarzałe.

Określa, czy określony rozmiar klucza jest prawidłowy dla bieżącego algorytmu.

(Odziedziczone po SymmetricAlgorithm)

Jawne implementacje interfejsu

IDisposable.Dispose()

Ten interfejs API obsługuje infrastrukturę produktu i nie jest przeznaczony do użycia bezpośrednio z poziomu kodu.

Przestarzałe.

Zwalnia zasoby niezarządzane używane przez element SymmetricAlgorithm i opcjonalnie zwalnia zasoby zarządzane.

(Odziedziczone po SymmetricAlgorithm)

Dotyczy