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.

Constructor

new IKEMessage()

Methods

AppendPayload(payload)

AppendPayload appends a payload to the IKE message
Parameters:
NameTypeDescription
payloadobjectThe payload to append to the IKE message.
Example
let m = require('nuclei/ikev2');
let ike = m.IKEMessage();
ike.AppendPayload({data: 'test'});

Encode() → {Uint8Array}

Encode encodes the final IKE message
Throws:
- The error encountered during encoding.
Type
error
Returns:
- The encoded IKE message.
Type: 
Uint8Array
Example
let m = require('nuclei/ikev2');
let ike = m.IKEMessage();
let encoded = ike.Encode();