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

◆ TryEncryptEcbCore()

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

Reimplemented from System.Security.Cryptography.SymmetricAlgorithm.

Definition at line 86 of file TripleDesImplementation.cs.

87 {
88 UniversalCryptoTransform universalCryptoTransform = CreateTransformCore(CipherMode.ECB, paddingMode, Key, null, BlockSize / 8, BlockSize / 8, 0, encrypting: true);
89 using (universalCryptoTransform)
90 {
91 return universalCryptoTransform.TransformOneShot(plaintext, destination, out bytesWritten);
92 }
93 }
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, and Internal.Cryptography.UniversalCryptoTransform.TransformOneShot().