diff options
Diffstat (limited to 'share/www/script/test/oauth.js')
-rw-r--r-- | share/www/script/test/oauth.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js index 8b71d745..ebe817b2 100644 --- a/share/www/script/test/oauth.js +++ b/share/www/script/test/oauth.js @@ -29,9 +29,10 @@ couchTests.oauth = function(debug) { // Simple secret key generator function generateSecret(length) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var secret = ''; for (var i=0; i<length; i++) { - secret += String.fromCharCode(Math.floor(Math.random() * 256)); + secret += tab.charAt(Math.floor(Math.random() * 64)); } return secret; } |