From 9f48c816de1c0212b06748ce93c0d9454911056d Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 25 Mar 2023 20:50:06 +0700 Subject: RFC 9146: TODOs for API changes when possible --- crypto/src/tls/crypto/TlsCipher.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/src/tls/crypto/TlsCipher.cs b/crypto/src/tls/crypto/TlsCipher.cs index 53a8141fd..9b69923ec 100644 --- a/crypto/src/tls/crypto/TlsCipher.cs +++ b/crypto/src/tls/crypto/TlsCipher.cs @@ -17,6 +17,7 @@ namespace Org.BouncyCastle.Tls.Crypto /// the actual input size for the plaintext. /// the maximum input size for the plaintext. /// the maximum output size of the ciphertext for plaintextlimit bytes of input. + // TODO[api] Only need plaintextLimit parameter (receiving current callers' plaintextLength) int GetCiphertextEncodeLimit(int plaintextLength, int plaintextLimit); /// Return the maximum size for the plaintext given ciphertextlimit bytes of ciphertext. @@ -35,10 +36,12 @@ namespace Org.BouncyCastle.Tls.Crypto /// A containing the result of encoding (after 'headerAllocation' unused /// bytes). /// + // TODO[api] Add a parameter for how much (D)TLSInnerPlaintext padding to add TlsEncodeResult EncodePlaintext(long seqNo, short contentType, ProtocolVersion recordVersion, int headerAllocation, byte[] plaintext, int offset, int len); #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + // TODO[api] Add a parameter for how much (D)TLSInnerPlaintext padding to add TlsEncodeResult EncodePlaintext(long seqNo, short contentType, ProtocolVersion recordVersion, int headerAllocation, ReadOnlySpan plaintext); #endif @@ -61,6 +64,7 @@ namespace Org.BouncyCastle.Tls.Crypto /// void RekeyEncoder(); + // TODO[api] Separate methods for decode, encode bool UsesOpaqueRecordType { get; } } } -- cgit 1.4.1