-
-
Save dansitu/3440202 to your computer and use it in GitHub Desktop.
Revisions
-
austintaylor revised this gist
Jul 6, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ Cryptojs is hosted on [Google Code](http://code.google.com/p/crypto-js/). There is an [npm module](http://search.npmjs.org/#/cryptojs) with source on [Github](https://github.com/gwjjeff/cryptojs/). -
austintaylor revised this gist
Jul 6, 2012 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Cryptojs is hosted on [Google Code](http://code.google.com/p/crypto-js/). There is an [npm](http://search.npmjs.org/#/cryptojs) with source on [Github](https://github.com/gwjjeff/cryptojs/). -
austintaylor revised this gist
Jul 5, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ test -
austintaylor revised this gist
Jul 5, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ var Crypto = require('cryptojs').Crypto, UserVoiceAccountKey = "YOUR_ACCOUNT_KEY", UserVoiceAPIKey = "YOUR_API_KEY"; function createUserVoiceSSOToken(data) { var key = Crypto.SHA1(UserVoiceAPIKey+UserVoiceAccountKey, {asBytes: true}).slice(0, 16), json = JSON.stringify(data), encrypted = Crypto.AES.encrypt(json, key, {mode:new Crypto.mode.CBC(Crypto.pad.pkcs7), iv:'OpenSSL for Ruby', asBytes:true}), base64 = Crypto.util.bytesToBase64(encrypted), -
austintaylor created this gist
Jul 5, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ var Crypto = require('cryptojs').Crypto, UserVoiceAccountKey = "YOUR_ACCOUNT_KEY", UserVocieAPIKey = "YOUR_API_KEY"; function createUserVoiceSSOToken(data) { var key = Crypto.SHA1(UserVocieAPIKey+UserVoiceAccountKey, {asBytes: true}).slice(0, 16), json = JSON.stringify(data), encrypted = Crypto.AES.encrypt(json, key, {mode:new Crypto.mode.CBC(Crypto.pad.pkcs7), iv:'OpenSSL for Ruby', asBytes:true}), base64 = Crypto.util.bytesToBase64(encrypted), uriEncoded = encodeURIComponent(base64); return uriEncoded; }