Skip to content

Instantly share code, notes, and snippets.

@muka
Last active August 29, 2017 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muka/404f8d344a4c093afdfe31b5a958e97f to your computer and use it in GitHub Desktop.
Save muka/404f8d344a4c093afdfe31b5a958e97f to your computer and use it in GitHub Desktop.
var s = "886953285be646dee459532b743aeb3c"
var out = []
for(var i=0; i<s.length; i++){
var i1 = s[i]
i++
var i2 = s[i]
out.push(`0x${i1}${i2}`)
}
console.log("{ %s }", out.join(", "))
// { 0x88, 0x69, 0x53, 0x28, 0x5b, 0xe6, 0x46, 0xde, 0xe4, 0x59, 0x53, 0x2b, 0x74, 0x3a, 0xeb, 0x3c }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment