Skip to main content

类: IKEMessage

ikev2.IKEMessage IKEMessage 是 IKEv2 消息 IKEv2 实现了 IKEv2 协议的有限子集,特别是 IKE_NOTIFY 和 IKE_NONCE 有效载荷以及 IKE_SA_INIT 交换。

目录

构造函数

属性

方法

构造函数

constructor

new IKEMessage(): IKEMessage

返回值

IKEMessage

定义于

ikev2.ts:52

属性

ExchangeType

Optional ExchangeType: number

定义于

ikev2.ts:44

Flags

Optional Flags: number

定义于

ikev2.ts:48

InitiatorSPI

Optional InitiatorSPI: number

定义于

ikev2.ts:36

Version

Optional Version: number

定义于

ikev2.ts:40

方法

AppendPayload

AppendPayload(payload): void AppendPayload 向 IKE 消息追加有效载荷 payload 可以是任何有效载荷,如 IKENotification、IKENonce 等。

参数

名称类型
payloadany

返回值

void 示例
const ikev2 = require('nuclei/ikev2');
const message = new ikev2.IKEMessage();
const nonce = new ikev2.IKENonce();
nonce.NonceData = [1, 2, 3];
message.AppendPayload(nonce);

定义于

ikev2.ts:65

Encode

Encode(): Uint8Array Encode 编码最终的 IKE 消息

返回值

Uint8Array 示例
const ikev2 = require('nuclei/ikev2');
const message = new ikev2.IKEMessage();
const nonce = new ikev2.IKENonce();
nonce.NonceData = [1, 2, 3];
message.AppendPayload(nonce);
log(message.Encode());

定义于

ikev2.ts:82