module hex
hex encoding and decoding module
Citation:
1
2var encoding = require('encoding');
var hex = encoding.hex;
or
1var hex = require('hex');
static function
encode
Encode data in hex
1static String hex.encode(Buffer data);
Call parameters:
- data:Buffer, the data to encode
return result:
- String, returns the encoded string
decode
Decodes a string into binary data in hex
1static Buffer hex.decode(String data);
Call parameters:
- data: String, the string to decode
return result:
- Buffer, returns the decoded binary data