File tree 6 files changed +57
-1
lines changed
6 files changed +57
-1
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -414,4 +414,5 @@ export class IncomingHeader
414
414
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896 ;
415
415
public static CUSTOM_USER_NOTIFICATION = 909 ;
416
416
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575 ;
417
+ public static HANDSHAKE_COMPLETE_DIFFIE = 3885 ;
417
418
}
Original file line number Diff line number Diff line change
1
+ import { IMessageEvent } from '../../../../../api' ;
2
+ import { MessageEvent } from '../../../../../events' ;
3
+ import { CompleteDiffieHandshakeParser } from '../../parser' ;
4
+
5
+ export class CompleteDiffieHandshakeEvent extends MessageEvent implements IMessageEvent
6
+ {
7
+ constructor ( callBack : Function )
8
+ {
9
+ super ( callBack , CompleteDiffieHandshakeParser ) ;
10
+ }
11
+
12
+ public getParser ( ) : CompleteDiffieHandshakeParser
13
+ {
14
+ return this . parser as CompleteDiffieHandshakeParser ;
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ export * from './CompleteDiffieHandshakeEvent' ;
1
2
export * from './NoobnessLevelMessageEvent' ;
Original file line number Diff line number Diff line change
1
+ import { IMessageDataWrapper , IMessageParser } from '../../../../../api' ;
2
+
3
+ export class CompleteDiffieHandshakeParser implements IMessageParser
4
+ {
5
+ private _encryptedPublicKey : string = null ;
6
+ private _serverClientEncryption : boolean = false ;
7
+
8
+ public flush ( ) : boolean
9
+ {
10
+ return true ;
11
+ }
12
+
13
+ public parse ( wrapper : IMessageDataWrapper ) : boolean
14
+ {
15
+ if ( ! wrapper ) return false ;
16
+
17
+ this . _encryptedPublicKey = wrapper . readString ( ) ;
18
+
19
+ if ( wrapper . bytesAvailable )
20
+ {
21
+ this . _serverClientEncryption = wrapper . readBoolean ( ) ;
22
+ }
23
+
24
+ return true ;
25
+ }
26
+
27
+ public get encryptedPublicKey ( ) : string
28
+ {
29
+ return this . _encryptedPublicKey ;
30
+ }
31
+
32
+ public get serverClientEncryption ( ) : boolean
33
+ {
34
+ return this . _serverClientEncryption ;
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ export * from './CompleteDiffieHandshakeParser' ;
1
2
export * from './NoobnessLevelMessageParser' ;
You can’t perform that action at this time.
0 commit comments