Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Internal.Cryptography.RC2Implementation Class Referencesealed

Public Member Functions

override ICryptoTransform CreateDecryptor ()
 
override ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[] rgbIV)
 
override ICryptoTransform CreateEncryptor ()
 
override ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[] rgbIV)
 
override void GenerateIV ()
 
override void GenerateKey ()
 
ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[]? rgbIV)
 
ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[]? rgbIV)
 
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 RC2 Create ()
 
static new? RC2 Create (string AlgName)
 

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)
 
virtual void Dispose (bool disposing)
 

Protected Attributes

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

Properties

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

Private Member Functions

ICryptoTransform CreateTransform (byte[] rgbKey, byte[] rgbIV, bool encrypting)
 
int GetPaddingSize ()
 
bool ValidKeySize (int keySizeBytes, out int keySizeBits)
 
int GetCiphertextLengthBlockAligned (int plaintextLength, PaddingMode paddingMode)
 
void CheckInitializationVectorSize (ReadOnlySpan< byte > iv)
 
void CheckFeedbackSize (int feedbackSizeInBits)
 

Static Private Member Functions

static void ValidateCFBFeedbackSize (int feedback)
 
static UniversalCryptoTransform CreateTransformCore (CipherMode cipherMode, PaddingMode paddingMode, byte[] key, int effectiveKeyLength, byte[] iv, int blockSize, int feedbackSize, int paddingSize, bool encrypting)
 
static void CheckPaddingMode (PaddingMode paddingMode)
 

Static Private Attributes

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

Detailed Description

Definition at line 7 of file RC2Implementation.cs.


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