Skip to content

Instantly share code, notes, and snippets.

@prakashnsm
Forked from jpatters/HeidiDecode.js
Last active August 31, 2015 18:07
Show Gist options
  • Select an option

  • Save prakashnsm/16cda551dd91e5426960 to your computer and use it in GitHub Desktop.

Select an option

Save prakashnsm/16cda551dd91e5426960 to your computer and use it in GitHub Desktop.

Revisions

  1. @tkncdn tkncdn revised this gist Jan 17, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion HeidiDecode.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    function heidiDecode(hex) {
    var str = '';
    var shift = parseInt(hex.substr(-1));
    hex = hex.substr(0, hex.length - 1);
    hex = hex.substr(0, hex.length - 1);
    for (var i = 0; i < hex.length; i += 2)
    str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
    return str;
  2. @tkncdn tkncdn created this gist Jan 17, 2013.
    9 changes: 9 additions & 0 deletions HeidiDecode.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    function heidiDecode(hex) {
    var str = '';
    var shift = parseInt(hex.substr(-1));
    hex = hex.substr(0, hex.length - 1);
    for (var i = 0; i < hex.length; i += 2)
    str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
    return str;
    }
    document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));