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

◆ TryEncryptCfbCore()

override bool Internal.Cryptography.TripleDesImplementation.TryEncryptCfbCore ( ReadOnlySpan< byte > plaintext,
ReadOnlySpan< byte > iv,
Span< byte > destination,
PaddingMode paddingMode,
int feedbackSizeInBits,
out int bytesWritten )
inlineprotectedvirtual

Reimplemented from System.Security.Cryptography.SymmetricAlgorithm.

Definition at line 123 of file TripleDesImplementation.cs.

124 {
125 ValidateCFBFeedbackSize(feedbackSizeInBits);
126 UniversalCryptoTransform universalCryptoTransform = CreateTransformCore(CipherMode.CFB, paddingMode, Key, iv.ToArray(), BlockSize / 8, feedbackSizeInBits / 8, feedbackSizeInBits / 8, encrypting: true);
127 using (universalCryptoTransform)
128 {
129 return universalCryptoTransform.TransformOneShot(plaintext, destination, out bytesWritten);
130 }
131 }
static UniversalCryptoTransform CreateTransformCore(CipherMode cipherMode, PaddingMode paddingMode, byte[] key, byte[] iv, int blockSize, int paddingSize, int feedbackSize, bool encrypting)

References System.Security.Cryptography.SymmetricAlgorithm.BlockSize, Internal.Cryptography.TripleDesImplementation.CreateTransformCore(), System.destination, System.Security.Cryptography.TripleDES.Key, System.ReadOnlySpan< T >.ToArray(), Internal.Cryptography.UniversalCryptoTransform.TransformOneShot(), and Internal.Cryptography.TripleDesImplementation.ValidateCFBFeedbackSize().