AesGcm Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| AesGcm(Byte[]) |
Föråldrad.
Initierar en ny instans av AesGcm klassen med en angivet nyckel. |
| AesGcm(ReadOnlySpan<Byte>) |
Föråldrad.
Initierar en ny instans av AesGcm klassen med en angivet nyckel. |
| AesGcm(Byte[], Int32) |
Initierar en ny instans av AesGcm klassen med en angivet nyckel och nödvändig taggstorlek. |
| AesGcm(ReadOnlySpan<Byte>, Int32) |
Initierar en ny instans av AesGcm klassen med en angivet nyckel och nödvändig taggstorlek. |
AesGcm(Byte[])
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
Varning
AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.
Initierar en ny instans av AesGcm klassen med en angivet nyckel.
public:
AesGcm(cli::array <System::Byte> ^ key);
[System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public AesGcm(byte[] key);
public AesGcm(byte[] key);
[<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
Public Sub New (key As Byte())
Parametrar
- key
- Byte[]
Den hemliga nyckel som ska användas för den här instansen.
- Attribut
Undantag
Parametern key är null.
Parameterlängden key är inte 16, 24 eller 32 byte (128, 192 eller 256 bitar).
Gäller för
AesGcm(ReadOnlySpan<Byte>)
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
Varning
AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.
Initierar en ny instans av AesGcm klassen med en angivet nyckel.
public:
AesGcm(ReadOnlySpan<System::Byte> key);
[System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public AesGcm(ReadOnlySpan<byte> key);
public AesGcm(ReadOnlySpan<byte> key);
[<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
Public Sub New (key As ReadOnlySpan(Of Byte))
Parametrar
- key
- ReadOnlySpan<Byte>
Den hemliga nyckel som ska användas för den här instansen.
- Attribut
Undantag
Parameterlängden key är inte 16, 24 eller 32 byte (128, 192 eller 256 bitar).
Gäller för
AesGcm(Byte[], Int32)
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
Initierar en ny instans av AesGcm klassen med en angivet nyckel och nödvändig taggstorlek.
public:
AesGcm(cli::array <System::Byte> ^ key, int tagSizeInBytes);
public AesGcm(byte[] key, int tagSizeInBytes);
new System.Security.Cryptography.AesGcm : byte[] * int -> System.Security.Cryptography.AesGcm
Public Sub New (key As Byte(), tagSizeInBytes As Integer)
Parametrar
- key
- Byte[]
Den hemliga nyckel som ska användas för den här instansen.
- tagSizeInBytes
- Int32
Storleken på taggen, i byte, som kryptering och dekryptering måste använda.
Undantag
Parametern key är null.
Parameterlängden key är inte 16, 24 eller 32 byte (128, 192 eller 256 bitar).
Parametern tagSizeInBytes är en taggstorlek som inte stöds som anges av TagByteSizes.
Den aktuella plattformen stöder inte AES-GCM.
Kommentarer
Parametern tagSizeInBytes används för att ange att taggparametern i Encrypt eller Decrypt måste vara exakt den här storleken. Om du anger den obligatoriska taggstorleken förhindras problem där anropare av Decrypt kan ange en tagg som indata och att indata trunkeras till en oväntad storlek.
Gäller för
AesGcm(ReadOnlySpan<Byte>, Int32)
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
- Källa:
- AesGcm.cs
Initierar en ny instans av AesGcm klassen med en angivet nyckel och nödvändig taggstorlek.
public:
AesGcm(ReadOnlySpan<System::Byte> key, int tagSizeInBytes);
public AesGcm(ReadOnlySpan<byte> key, int tagSizeInBytes);
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> * int -> System.Security.Cryptography.AesGcm
Public Sub New (key As ReadOnlySpan(Of Byte), tagSizeInBytes As Integer)
Parametrar
- key
- ReadOnlySpan<Byte>
Den hemliga nyckel som ska användas för den här instansen.
- tagSizeInBytes
- Int32
Storleken på taggen, i byte, som kryptering och dekryptering måste använda.
Undantag
Parameterlängden key är inte 16, 24 eller 32 byte (128, 192 eller 256 bitar).
Parametern tagSizeInBytes är en taggstorlek som inte stöds som anges av TagByteSizes.
Den aktuella plattformen stöder inte AES-GCM.
Kommentarer
Parametern tagSizeInBytes används för att ange att taggparametern i Encrypt eller Decrypt måste vara exakt den här storleken. Om du anger den obligatoriska taggstorleken förhindras problem där anropare av Decrypt kan ange en tagg som indata och att indata trunkeras till en oväntad storlek.