Skip to content

Instantly share code, notes, and snippets.

@pbouzakis
Created April 19, 2012 15:14
Show Gist options
  • Save pbouzakis/2421591 to your computer and use it in GitHub Desktop.
Save pbouzakis/2421591 to your computer and use it in GitHub Desktop.
var random = Math.floor(Math.random() * 100001);
var sha256 = crypto.createHmac("sha256", random + "TROGDOR_THE_BURNINATOR");
var timestamp = new Date().toJSON();
return sha256.update(customerId + deviceToken).digest("hex");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment