Class TlsNullNullCipher
- Namespace
- Org.BouncyCastle.Tls.Crypto
- Assembly
- BouncyCastle.Cryptography.dll
The cipher for TLS_NULL_WITH_NULL_NULL.
public sealed class TlsNullNullCipher : TlsCipher
- Inheritance
-
TlsNullNullCipher
- Implements
- Inherited Members
Fields
Instance
public static readonly TlsNullNullCipher Instance
Field Value
Properties
UsesOpaqueRecordType
public bool UsesOpaqueRecordType { get; }
Property Value
Methods
DecodeCiphertext(long, short, ProtocolVersion, byte[], int, int)
Decode the passed in ciphertext using the current bulk cipher.
public TlsDecodeResult DecodeCiphertext(long seqNo, short recordType, ProtocolVersion recordVersion, byte[] ciphertext, int offset, int len)
Parameters
seqNolongsequence number of the message represented by ciphertext.
recordTypeshortcontent type used in the record for this message.
recordVersionProtocolVersionProtocolVersion used for the record.
ciphertextbyte[]array holding input ciphertext to the cipher.
offsetintoffset into input array the ciphertext starts at.
lenintlength of the ciphertext in the array.
Returns
- TlsDecodeResult
A TlsDecodeResult containing the result of decoding.
Exceptions
EncodePlaintext(long, short, ProtocolVersion, int, byte[], int, int)
Encode the passed in plaintext using the current bulk cipher.
public TlsEncodeResult EncodePlaintext(long seqNo, short contentType, ProtocolVersion recordVersion, int headerAllocation, byte[] plaintext, int offset, int len)
Parameters
seqNolongsequence number of the message represented by plaintext.
contentTypeshortcontent type of the message represented by plaintext.
recordVersionProtocolVersionProtocolVersion used for the record.
headerAllocationintextra bytes to allocate at start of returned byte array.
plaintextbyte[]array holding input plaintext to the cipher.
offsetintoffset into input array the plaintext starts at.
lenintlength of the plaintext in the array.
Returns
- TlsEncodeResult
A TlsEncodeResult containing the result of encoding (after 'headerAllocation' unused bytes).
Exceptions
EncodePlaintext(long, short, ProtocolVersion, int, ReadOnlySpan<byte>)
public TlsEncodeResult EncodePlaintext(long seqNo, short contentType, ProtocolVersion recordVersion, int headerAllocation, ReadOnlySpan<byte> plaintext)
Parameters
seqNolongcontentTypeshortrecordVersionProtocolVersionheaderAllocationintplaintextReadOnlySpan<byte>
Returns
GetCiphertextDecodeLimit(int)
Return the maximum input size for a ciphertext given a maximum output size for the plaintext of plaintextLimit bytes.
public int GetCiphertextDecodeLimit(int plaintextLimit)
Parameters
plaintextLimitintthe maximum output size for the plaintext.
Returns
- int
the maximum input size of the ciphertext for plaintextlimit bytes of output.
GetCiphertextEncodeLimit(int, int)
Return the maximum output size for a ciphertext given an actual input plaintext size of plaintextLength bytes and a maximum input plaintext size of plaintextLimit bytes.
public int GetCiphertextEncodeLimit(int plaintextLength, int plaintextLimit)
Parameters
plaintextLengthintthe actual input size for the plaintext.
plaintextLimitintthe maximum input size for the plaintext.
Returns
- int
the maximum output size of the ciphertext for plaintextlimit bytes of input.
GetPlaintextLimit(int)
Return the maximum size for the plaintext given ciphertextlimit bytes of ciphertext.
public int GetPlaintextLimit(int ciphertextLimit)
Parameters
ciphertextLimitintthe maximum number of bytes of ciphertext.
Returns
- int
the maximum size of the plaintext for ciphertextlimit bytes of input.
RekeyDecoder()
public void RekeyDecoder()
Exceptions
RekeyEncoder()
public void RekeyEncoder()