@@ -134,28 +134,42 @@ export class TLSPlaintext extends Uint8Array {
134134}
135135
136136/**
137- * Represents a TLSInnerPlaintext structure in the TLS 1.3 protocol.
138- * This class extends `Uint8Array` to encapsulate TLSInnerPlaintext data.
137+ * Represents a TLSInnerPlaintext structure as per the TLS 1.3 specification.
139138 */
140139export class TLSInnerPlaintext extends Uint8Array {
140+ /** The content of the plaintext. */
141+ content : Uint8Array ;
142+
143+ /** The content type associated with this plaintext. */
144+ type : ContentType ;
145+
146+ /** The number of trailing zero bytes in the structure. */
147+ numZeros : number ;
148+
141149 /**
142- * Creates a TLSInnerPlaintext instance from a given array.
143- *
144- * @param {Uint8Array } array - The input array to parse.
145- * @returns {TLSInnerPlaintext } A new instance of TLSInnerPlaintext.
150+ * Parses a `TLSInnerPlaintext` instance from a given array.
151+ * @param {Uint8Array } array - The input array to parse.
152+ * @returns {TLSInnerPlaintext } The parsed `TLSInnerPlaintext` instance.
146153 */
147154 static from ( array : Uint8Array ) : TLSInnerPlaintext ;
148155
149156 /**
150- * Constructs a TLSInnerPlaintext structure.
151- *
152- * @param {Uint8Array } content - The content bytes.
153- * @param {ContentType } type - The content type as a `ContentType` instance.
154- * @param {number } numZeros - The number of zero bytes to pad.
157+ * Constructs a `TLSInnerPlaintext` instance.
158+ * @param {Uint8Array } content - The main content of the plaintext.
159+ * @param {ContentType } type - The content type associated with the plaintext.
160+ * @param {number } [numZeros=0] - The number of trailing zero bytes (default is 0).
155161 */
156- constructor ( content : Uint8Array , type : ContentType , numZeros : number ) ;
162+ constructor ( content : Uint8Array , type : ContentType , numZeros ?: number ) ;
163+
164+ /**
165+ * Generates a header for this plaintext structure.
166+ * @param {number } keyLength - The length of the encryption key.
167+ * @returns {Uint8Array } The generated header.
168+ */
169+ header ( keyLength : number ) : Uint8Array ;
157170}
158171
172+
159173/**
160174 * Represents a TLSCiphertext structure in a TLS handshake.
161175 * Extends `Uint8Array` to include additional TLS-specific data and methods.
0 commit comments