Class: IKEMessage

ikev2.IKEMessage

IKEMessage is the IKEv2 message IKEv2 implements a limited subset of IKEv2 Protocol, specifically the IKE_NOTIFY and IKE_NONCE payloads and the IKE_SA_INIT exchange.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IKEMessage(): IKEMessage

Returns

IKEMessage

Defined in

ikev2.ts:52

Properties

ExchangeType

Optional ExchangeType: number

Defined in

ikev2.ts:44


Flags

Optional Flags: number

Defined in

ikev2.ts:48


InitiatorSPI

Optional InitiatorSPI: number

Defined in

ikev2.ts:36


Version

Optional Version: number

Defined in

ikev2.ts:40

Methods

AppendPayload

AppendPayload(payload): void

AppendPayload appends a payload to the IKE message payload can be any of the payloads like IKENotification, IKENonce, etc.

Parameters

NameType
payloadany

Returns

void

Example

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

Defined in

ikev2.ts:65


Encode

Encode(): Uint8Array

Encode encodes the final IKE message

Returns

Uint8Array

Example

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());

Defined in

ikev2.ts:82