Module basic module

Module base32

base32 encoding and decoding module

Reference method:

1 2
var encoding = require('encoding'); var base32 = encoding.base32;

or

1
var base32 = require('base32');

Static function

encode

Encode data in base32

1
static String base32.encode(Buffer data);

Call parameters:

  • data: Buffer, The data to be encoded

Return result:

  • String, Return the encoded string

decode

Decode a string into binary data in base32 mode

1
static Buffer base32.decode(String data);

Call parameters:

  • data: String, the string to be decoded

Return result:

  • Buffer, Return the decoded binary data