code: function derive_key (secret, salt, iterations, keylen) {
     var iterations = iterations || 1000;
     var keylen = keylen || 32;
     var config = {
        keySize: keylen / 4,
        iterations: iterations,
        hasher: crypto.algo.SHA256
     }
     var key = crypto.PBKDF2(secret, salt, config);
     return key.toString(crypto.enc.Base64);
  }
docs: PBKDF2-base key derivation function for salted WAMP-CRA