Skip to content

Instantly share code, notes, and snippets.

Theo Schlossnagle postwait

Block or report user

Report or block postwait

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
postwait / hex.js
Created Oct 30, 2017 — forked from valentinkostadinov/hex.js
JavaScript HEX encoding
View hex.js
function toHex(s) {
// utf8 to latin1
var s = unescape(encodeURIComponent(s))
var h = ''
for (var i = 0; i < s.length; i++) {
h += s.charCodeAt(i).toString(16)
return h
You can’t perform that action at this time.