On the back end I needed to create javascript that looked like this:
The user hash needed to be a SHA256 hash of the users email address and the unique "salt" or secret key provided by intercom.io on a user account basis.
The problem was that I'm using Vbscript/classic ASP so was having trouble sorting this out with the limited VBScript library.
The solution was found courtesy of:
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
* Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
* Adapted into a WSC for use in classic ASP by Daniel O'Malley
* (based on an SHA-1 example by Erik Oosterwaal)
* for use with the Amazon Product Advertising API
*/
Basically you create a stand alone file called sha256.wsc that lives in the same directory as the function - then pass in the appropriate variables.
VBScript Function:
The contents for sha256.wsc follow at the end of the post. Good luck and happy coding
Great website, looks very professional. Keep up the good work!
ReplyDeleteQTP Training in Chennai
QTP Training
QTP Training Institutes in Chennai
QTP Training in Adyar
LoadRunner Training in Chennai
Loadrunner Training
javascript training in chennai
core java training in chennai
Incredible Posts!!!Keep doing...
ReplyDeleteJava training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery
This comment has been removed by the author.
ReplyDeleteI've been using this for several years and just discovered a bug in the code.
ReplyDeleteoutput = encoding[0] + output;
needs to be changed to
output = encoding.charAt(0) + output;
Great thanks for sharing this article. Much thanks again. Cool.hospitality wifi solution
ReplyDeleteSketchUp Pro Crack is a 3D plan programming that permits you to draw outlines, 3D items, computer games, and other plan objects. Sketchup Free License
ReplyDeleteThursday Wishes, Quotes and Greetings. Free Thursday images for whatsapp collection. You will find below a curated collection of good morning images Thursday Quotes
ReplyDelete