Home > Code Snippets, Javascript > Javascript API Credentials – Just a port

Javascript API Credentials – Just a port

There is not much to write than to attribute the logic up to a post on online code generator. Well since this was written in php and I needed the same in javascript, there was some cutting corners, and finally the script which is attached came up.



The vars defined hold the two array of strings, and the function generates the key. Calling the function with genKey(16, access_salt) will generate a 16 char random string from the defined array access_salt.

Random String JS (1172)

  1. No comments yet.
  1. No trackbacks yet.

− four = five