SyntaxFix
Write A Post
Hire A Developer
Questions
Here is a tweak of McDowell's algorithm that doesn't pad the result:
function toHex(str) { var result = ''; for (var i=0; i<str.length; i++) { result += str.charCodeAt(i).toString(16); } return result; }