Nodejs Utililty Methods Hex Decode

List of utility methods to do Hex Decode

Description

The list of methods to do Hex Decode are organized into topic(s).

Method

hexDecode()
String.prototype.hexDecode = function() {
  var j;
  var hexes = this.match(/.{1,4}/g) || [];
  var back = "";
  for (j = 0; j < hexes.length; j++) {
    back += String.fromCharCode(parseInt(hexes[j], 16));
  return back;
};
...
hexDecode8()
String.prototype.hexDecode8 = function(){
    var j;
    var hexes = this.match(/.{1,2}/g) || [];
    var back = "";
    for(j = 0; j<hexes.length; j++) {
        back += String.fromCharCode(parseInt(hexes[j], 16));
    return back;