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

◆ TryEncryptCbcCore()

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

Reimplemented from System.Security.Cryptography.SymmetricAlgorithm.

Definition at line 97 of file DesImplementation.cs.

98 {
99 UniversalCryptoTransform universalCryptoTransform = CreateTransformCore(CipherMode.CBC, paddingMode, Key, iv.ToArray(), BlockSize / 8, 0, BlockSize / 8, encrypting: true);
100 using (universalCryptoTransform)
101 {
102 return universalCryptoTransform.TransformOneShot(plaintext, destination, out bytesWritten);
103 }
104 }
static UniversalCryptoTransform CreateTransformCore(CipherMode cipherMode, PaddingMode paddingMode, byte[] key, byte[] iv, int blockSize, int feedbackSize, int paddingSize, bool encrypting)
override byte[] Key
Definition DES.cs:24

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