mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
#28 - InitDiffieHandshakeEvent added
This commit is contained in:
parent
26741b78a7
commit
7087e93220
File diff suppressed because one or more lines are too long
@ -414,4 +414,5 @@ export class IncomingHeader
|
|||||||
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
|
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
|
||||||
public static CUSTOM_USER_NOTIFICATION = 909;
|
public static CUSTOM_USER_NOTIFICATION = 909;
|
||||||
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
|
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
|
||||||
|
public static HANDSHAKE_INIT_DIFFIE = 1347;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { InitDiffieHandshakeParser } from '../../parser';
|
||||||
|
|
||||||
|
export class InitDiffieHandshakeEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, InitDiffieHandshakeParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): InitDiffieHandshakeParser
|
||||||
|
{
|
||||||
|
return this.parser as InitDiffieHandshakeParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
|
export * from './InitDiffieHandshakeEvent';
|
||||||
export * from './NoobnessLevelMessageEvent';
|
export * from './NoobnessLevelMessageEvent';
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class InitDiffieHandshakeParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _encryptedPrime: string;
|
||||||
|
private _encryptedGenerator: string;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._encryptedPrime = wrapper.readString();
|
||||||
|
this._encryptedGenerator = wrapper.readString();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get encryptedPrime(): string
|
||||||
|
{
|
||||||
|
return this._encryptedPrime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get encryptedGenerator(): string
|
||||||
|
{
|
||||||
|
return this._encryptedGenerator;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
|
export * from './InitDiffieHandshakeParser';
|
||||||
export * from './NoobnessLevelMessageParser';
|
export * from './NoobnessLevelMessageParser';
|
||||||
|
Loading…
Reference in New Issue
Block a user