File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @tls/enum" ,
3- "version" : " 0.4.7 " ,
3+ "version" : " 0.4.8 " ,
44 "exports" : " ./src/mod.ts" ,
55 "publish" : {
66 "exclude" : [" dist/" ]
1717 "@noble/hashes" : " npm:@noble/hashes@^1.6.1" ,
1818 "@peculiar/x509" : " npm:@peculiar/x509@^1.12.3" ,
1919 "@std/assert" : " jsr:@std/assert@^1.0.2" ,
20- "@tls/struct" : " jsr:@tls/struct@^0.3.2 "
20+ "@tls/struct" : " jsr:@tls/struct@^0.3.6 "
2121 }
2222}
Original file line number Diff line number Diff line change 22// @ts -self-types="../type/handshaketype.d.ts"
33import { Enum } from "./enum.js" ;
44import { Struct , Uint24 , Uint8 } from "./dep.ts" ;
5+ import { ContentType } from "./contentype.js"
56
67/**
78 * Represents TLS 1.3 Handshake message types as defined in RFC 8446 Section 4
@@ -128,6 +129,9 @@ export class Handshake extends Uint8Array {
128129 this . items = struct . items
129130 }
130131 get byte ( ) { return Uint8Array . from ( this ) }
132+ tlsInnerPlaintext ( numZeros ) {
133+ return ContentType . APPLICATION_DATA . tlsInnerPlaintext ( this , numZeros )
134+ }
131135}
132136
133137// npx -p typescript tsc ./src/handshaketype.js --declaration --allowJs --emitDeclarationOnly --lib ESNext --outDir ./dist
Original file line number Diff line number Diff line change @@ -128,4 +128,12 @@ export declare class Handshake extends Uint8Array {
128128 constructor ( msg_type : HandshakeType , message : Uint8Array ) ;
129129 /** return Uint8Array */
130130 get byte ( ) : Uint8Array
131+
132+ /**
133+ * Generates TLS inner plaintext by processing the current context with specified padding.
134+ *
135+ * @param {number } numZeros - The number of zero bytes to use as padding in the TLS inner plaintext.
136+ * @returns {Uint8Array } The formatted TLS inner plaintext data.
137+ */
138+ tlsInnerPlaintext ( numZeros : number ) : Uint8Array ;
131139}
You can’t perform that action at this time.
0 commit comments