diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-25 20:50:06 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-13 17:16:20 +0700 |
commit | 9f48c816de1c0212b06748ce93c0d9454911056d (patch) | |
tree | 5437efee2b814b7092ec833949ef33b9a26b6eed | |
parent | RFC 9146: Update RecordStream for completeness (diff) | |
download | BouncyCastle.NET-ed25519-9f48c816de1c0212b06748ce93c0d9454911056d.tar.xz |
RFC 9146: TODOs for API changes when possible
-rw-r--r-- | crypto/src/tls/crypto/TlsCipher.cs | 4 |
1 files changed, 4 insertions, 0 deletions
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 /// <param name="plaintextLength">the actual input size for the plaintext.</param> /// <param name="plaintextLimit">the maximum input size for the plaintext.</param> /// <returns>the maximum output size of the ciphertext for plaintextlimit bytes of input.</returns> + // TODO[api] Only need plaintextLimit parameter (receiving current callers' plaintextLength) int GetCiphertextEncodeLimit(int plaintextLength, int plaintextLimit); /// <summary>Return the maximum size for the plaintext given ciphertextlimit bytes of ciphertext.</summary> @@ -35,10 +36,12 @@ namespace Org.BouncyCastle.Tls.Crypto /// <returns>A <see cref="TlsEncodeResult"/> containing the result of encoding (after 'headerAllocation' unused /// bytes).</returns> /// <exception cref="IOException"/> + // 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<byte> plaintext); #endif @@ -61,6 +64,7 @@ namespace Org.BouncyCastle.Tls.Crypto /// <exception cref="IOException"/> void RekeyEncoder(); + // TODO[api] Separate methods for decode, encode bool UsesOpaqueRecordType { get; } } } |