Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreatePersistedCryptoTransformCore()

Internal.Cryptography.UniversalCryptoTransform Internal.Cryptography.CngSymmetricAlgorithmCore.CreatePersistedCryptoTransformCore ( Func< CngKey > cngKeyFactory,
byte[] iv,
bool encrypting,
PaddingMode padding,
CipherMode mode,
int feedbackSizeInBits )
inlineprivate

Definition at line 157 of file CngSymmetricAlgorithmCore.cs.

158 {
159 ValidateFeedbackSize(mode, feedbackSizeInBits);
160 int blockSizeInBytes = _outer.BlockSize.BitSizeToByteSize();
161 Internal.Cryptography.BasicSymmetricCipher cipher = new BasicSymmetricCipherNCrypt(cngKeyFactory, mode, blockSizeInBytes, iv, encrypting, _outer.GetPaddingSize(mode, feedbackSizeInBits));
162 return Internal.Cryptography.UniversalCryptoTransform.Create(padding, cipher, encrypting);
163 }
static UniversalCryptoTransform Create(PaddingMode paddingMode, BasicSymmetricCipher cipher, bool encrypting)
int GetPaddingSize(CipherMode mode, int feedbackSizeBits)
void ValidateFeedbackSize(CipherMode mode, int feedbackSizeInBits)

References Internal.Cryptography.CngSymmetricAlgorithmCore._outer, Internal.Cryptography.ICngSymmetricAlgorithm.BlockSize, Internal.Cryptography.UniversalCryptoTransform.Create(), Internal.Cryptography.ICngSymmetricAlgorithm.GetPaddingSize(), and Internal.Cryptography.CngSymmetricAlgorithmCore.ValidateFeedbackSize().

Referenced by Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransform(), and Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransform().