1+ // encrypted_extensions.d.ts
2+
13import { Constrained , Extension } from "../src/dep.ts" ;
4+
25/**
3- * Represents the EncryptedExtensions in a TLS handshake, as described in
4- * [RFC 8446 Section 4.3.1](https://datatracker.ietf.org/doc/html/rfc8446#section-4.3.1).
5- *
6- * EncryptedExtensions is used to carry extensions from the server in a secure context.
6+ * Represents the EncryptedExtensions structure as defined in RFC 8446, Section 4.3.1.
7+ * Contains a set of extensions used during the TLS handshake.
8+ * @see https://datatracker.ietf.org/doc/html/rfc8446#section-4.3.1
79 */
810export class EncryptedExtensions extends Constrained {
9- /**
10- * Creates a new instance of `EncryptedExtensions` from an array of bytes.
11- *
12- * @param array - A `Uint8Array` containing the serialized representation of the extensions.
13- * @returns A new `EncryptedExtensions` instance with parsed extensions.
14- * @throws {Error } If parsing fails due to invalid structure or data.
15- */
16- static from ( array : Uint8Array ) : EncryptedExtensions ;
17-
18- /**
19- * Constructs a new `EncryptedExtensions` instance.
20- *
21- * @param extension - A variable number of extensions to be included in the encrypted extensions.
22- */
23- constructor ( ...extension : Extension [ ] ) ;
24- }
25-
11+ /**
12+ * Creates an `EncryptedExtensions` instance from a list of extensions.
13+ * @param {...Extension } extensions - List of extensions.
14+ * @returns {EncryptedExtensions } - The constructed EncryptedExtensions instance.
15+ */
16+ static fromExtensions ( ...extensions : Extension [ ] ) : EncryptedExtensions ;
17+
18+ /**
19+ * Creates an `EncryptedExtensions` instance from a Uint8Array.
20+ * @param {Uint8Array } array - The array to parse.
21+ * @returns {EncryptedExtensions } - Parsed EncryptedExtensions instance.
22+ */
23+ static from ( array : Uint8Array ) : EncryptedExtensions ;
24+
25+ /**
26+ * Constructs a new `EncryptedExtensions` instance.
27+ * @param {...Extension } extension - List of extensions.
28+ */
29+ constructor ( ...extension : Extension [ ] ) ;
30+ }
0 commit comments