Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Security.Cryptography.AesCng Class Referencesealed

Public Member Functions

 AesCng ()
 
 AesCng (string keyName)
 
 AesCng (string keyName, CngProvider provider)
 
 AesCng (string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
 
override ICryptoTransform CreateDecryptor ()
 
override ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[]? rgbIV)
 
override ICryptoTransform CreateEncryptor ()
 
override ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[]? rgbIV)
 
override void GenerateKey ()
 
override void GenerateIV ()
 
void Dispose ()
 
void Clear ()
 
bool ValidKeySize (int bitLength)
 
int GetCiphertextLengthEcb (int plaintextLength, PaddingMode paddingMode)
 
int GetCiphertextLengthCbc (int plaintextLength, PaddingMode paddingMode=PaddingMode.PKCS7)
 
int GetCiphertextLengthCfb (int plaintextLength, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
byte[] DecryptEcb (byte[] ciphertext, PaddingMode paddingMode)
 
byte[] DecryptEcb (ReadOnlySpan< byte > ciphertext, PaddingMode paddingMode)
 
int DecryptEcb (ReadOnlySpan< byte > ciphertext, Span< byte > destination, PaddingMode paddingMode)
 
bool TryDecryptEcb (ReadOnlySpan< byte > ciphertext, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
byte[] EncryptEcb (byte[] plaintext, PaddingMode paddingMode)
 
byte[] EncryptEcb (ReadOnlySpan< byte > plaintext, PaddingMode paddingMode)
 
int EncryptEcb (ReadOnlySpan< byte > plaintext, Span< byte > destination, PaddingMode paddingMode)
 
bool TryEncryptEcb (ReadOnlySpan< byte > plaintext, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
byte[] DecryptCbc (byte[] ciphertext, byte[] iv, PaddingMode paddingMode=PaddingMode.PKCS7)
 
byte[] DecryptCbc (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, PaddingMode paddingMode=PaddingMode.PKCS7)
 
int DecryptCbc (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode=PaddingMode.PKCS7)
 
bool TryDecryptCbc (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, out int bytesWritten, PaddingMode paddingMode=PaddingMode.PKCS7)
 
byte[] EncryptCbc (byte[] plaintext, byte[] iv, PaddingMode paddingMode=PaddingMode.PKCS7)
 
byte[] EncryptCbc (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, PaddingMode paddingMode=PaddingMode.PKCS7)
 
int EncryptCbc (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode=PaddingMode.PKCS7)
 
bool TryEncryptCbc (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, out int bytesWritten, PaddingMode paddingMode=PaddingMode.PKCS7)
 
byte[] DecryptCfb (byte[] ciphertext, byte[] iv, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
byte[] DecryptCfb (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
int DecryptCfb (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
bool TryDecryptCfb (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, out int bytesWritten, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
byte[] EncryptCfb (byte[] plaintext, byte[] iv, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
byte[] EncryptCfb (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
int EncryptCfb (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 
bool TryEncryptCfb (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, out int bytesWritten, PaddingMode paddingMode=PaddingMode.None, int feedbackSizeInBits=8)
 

Static Public Member Functions

static new Aes Create ()
 
static new? Aes Create (string algorithmName)
 

Protected Member Functions

override bool TryDecryptEcbCore (ReadOnlySpan< byte > ciphertext, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
override bool TryEncryptEcbCore (ReadOnlySpan< byte > plaintext, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
override bool TryEncryptCbcCore (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
override bool TryDecryptCbcCore (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode, out int bytesWritten)
 
override bool TryDecryptCfbCore (ReadOnlySpan< byte > ciphertext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode, int feedbackSizeInBits, out int bytesWritten)
 
override bool TryEncryptCfbCore (ReadOnlySpan< byte > plaintext, ReadOnlySpan< byte > iv, Span< byte > destination, PaddingMode paddingMode, int feedbackSizeInBits, out int bytesWritten)
 
override void Dispose (bool disposing)
 

Protected Attributes

CipherMode ModeValue
 
PaddingMode PaddingValue
 
byte?[] KeyValue
 
byte?[] IVValue
 
int BlockSizeValue
 
int FeedbackSizeValue
 
int KeySizeValue
 
KeySizes[] LegalBlockSizesValue
 
KeySizes[] LegalKeySizesValue
 

Properties

override byte[] Key [get, set]
 
override int KeySize [get, set]
 
byte[] ICngSymmetricAlgorithm. BaseKey [get, set]
 
int ICngSymmetricAlgorithm. BaseKeySize [get, set]
 
virtual int FeedbackSize [get, set]
 
virtual int BlockSize [get, set]
 
virtual byte[] IV [get, set]
 
virtual KeySizes[] LegalBlockSizes [get]
 
virtual KeySizes[] LegalKeySizes [get]
 
virtual CipherMode Mode [get, set]
 
virtual PaddingMode Padding [get, set]
 
int BlockSize [get]
 
int FeedbackSize [get]
 
CipherMode Mode [get]
 
PaddingMode Padding [get]
 
byte[] IV [get, set]
 
KeySizes[] LegalKeySizes [get]
 

Private Member Functions

bool ICngSymmetricAlgorithm. IsWeakKey (byte[] key)
 
int ICngSymmetricAlgorithm. GetPaddingSize (CipherMode mode, int feedbackSizeBits)
 
Internal.NativeCrypto.SafeAlgorithmHandle ICngSymmetricAlgorithm. GetEphemeralModeHandle (CipherMode mode, int feedbackSizeInBits)
 
string ICngSymmetricAlgorithm. GetNCryptAlgorithmIdentifier ()
 
byte[] ICngSymmetricAlgorithm. PreprocessKey (byte[] key)
 
bool ICngSymmetricAlgorithm. IsValidEphemeralFeedbackSize (int feedbackSizeInBits)
 
int GetCiphertextLengthBlockAligned (int plaintextLength, PaddingMode paddingMode)
 
void CheckInitializationVectorSize (ReadOnlySpan< byte > iv)
 
void CheckFeedbackSize (int feedbackSizeInBits)
 

Static Private Member Functions

static void CheckPaddingMode (PaddingMode paddingMode)
 

Private Attributes

CngSymmetricAlgorithmCore _core
 

Static Private Attributes

static readonly KeySizes[] s_legalBlockSizes
 
static readonly KeySizes[] s_legalKeySizes
 

Detailed Description

Definition at line 6 of file AesCng.cs.


The documentation for this class was generated from the following file: