import { encode , types , decode } from "binary-data" ; export class ChangeCipherSpec { static readonly spec = { type : types . uint8 , } ; constructor ( public type = 1 ) { } static createEmpty ( ) { return new ChangeCipherSpec ( ) ; } static deSerialize ( buf ) { return new ChangeCipherSpec ( ... Object . values ( decode ( buf , ChangeCipherSpec . spec ) ) ) ; } serialize ( ) { const res = encode ( this , ChangeCipherSpec . spec ) . slice ( ) ; return Buffer . from ( res ) ; } }