Class: MPI

type/mpi~MPI()

new MPI()

Source:

Methods

read(input, endian) → {Integer}

Parsing function for a MPI (RFC 4880 3.2).

Parameters:
Name Type Description
input Uint8Array

Payload of MPI data

endian String

Endianness of the data; 'be' for big-endian or 'le' for little-endian

Source:
Returns:

Length of data read

Type
Integer

write(endian, length) → {Uint8Aray}

Converts the mpi object to a bytes as specified in RFC4880 3.2

Parameters:
Name Type Description
endian String

Endianness of the payload; 'be' for big-endian or 'le' for little-endian

length Integer

Length of the data part of the MPI

Source:
Returns:

mpi Byte representation

Type
Uint8Aray