From dca34b058c4fa29bf4837812ffd23b5068086017 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 23 Jul 2022 23:40:56 +0700 Subject: ChaCha20Poly1305 perf. opts. --- crypto/src/tls/crypto/impl/bc/BcChaCha20Poly1305.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/src/tls') diff --git a/crypto/src/tls/crypto/impl/bc/BcChaCha20Poly1305.cs b/crypto/src/tls/crypto/impl/bc/BcChaCha20Poly1305.cs index 8d801ed7a..ab78d0ce2 100644 --- a/crypto/src/tls/crypto/impl/bc/BcChaCha20Poly1305.cs +++ b/crypto/src/tls/crypto/impl/bc/BcChaCha20Poly1305.cs @@ -30,7 +30,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC { int ciphertextLength = inputLength; - m_cipher.ProcessBytes(input, inputOffset, inputLength, output, outputOffset); + m_cipher.DoFinal(input, inputOffset, inputLength, output, outputOffset); int outputLength = inputLength; if (ciphertextLength != outputLength) @@ -63,7 +63,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC if (badMac) throw new TlsFatalAlert(AlertDescription.bad_record_mac); - m_cipher.ProcessBytes(input, inputOffset, ciphertextLength, output, outputOffset); + m_cipher.DoFinal(input, inputOffset, ciphertextLength, output, outputOffset); int outputLength = ciphertextLength; if (ciphertextLength != outputLength) -- cgit 1.5.1