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

◆ TransformOneShot() [2/2]

override bool Internal.Cryptography.UniversalCryptoEncryptor.TransformOneShot ( ReadOnlySpan< byte > input,
Span< byte > output,
out int bytesWritten )
inline

Definition at line 31 of file UniversalCryptoEncryptor.cs.

32 {
33 int ciphertextLength = GetCiphertextLength(input.Length);
34 if (output.Length < ciphertextLength)
35 {
36 bytesWritten = 0;
37 return false;
38 }
39 Span<byte> span = output[..PadBlock(input, output)];
40 bytesWritten = base.BasicSymmetricCipher.TransformFinal(span, span);
41 return true;
42 }
int PadBlock(ReadOnlySpan< byte > block, Span< byte > destination)
int Length
Definition Span.cs:70

References Internal.Cryptography.UniversalCryptoEncryptor.GetCiphertextLength(), System.input, System.Span< T >.Length, and Internal.Cryptography.UniversalCryptoEncryptor.PadBlock().