parse 4.3.0-alpha.4 → 4.3.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v4.3.0-alpha.4
2
+ * Parse JavaScript SDK v4.3.0-alpha.5
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -557,7 +557,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
557
557
  SERVER_AUTH_TOKEN: null,
558
558
  LIVEQUERY_SERVER_URL: null,
559
559
  ENCRYPTED_KEY: null,
560
- VERSION: 'js' + "4.3.0-alpha.4",
560
+ VERSION: 'js' + "4.3.0-alpha.5",
561
561
  APPLICATION_ID: null,
562
562
  JAVASCRIPT_KEY: null,
563
563
  MASTER_KEY: null,
@@ -28028,14 +28028,19 @@ module.exports = parent;
28028
28028
  * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
28029
28029
  * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
28030
28030
  */
28031
- execute: function (password, keySize, ivSize, salt) {
28031
+ execute: function (password, keySize, ivSize, salt, hasher) {
28032
28032
  // Generate random salt
28033
28033
  if (!salt) {
28034
28034
  salt = WordArray.random(64/8);
28035
28035
  }
28036
28036
 
28037
28037
  // Derive key and IV
28038
- var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
28038
+ if (!hasher) {
28039
+ var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
28040
+ } else {
28041
+ var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt);
28042
+ }
28043
+
28039
28044
 
28040
28045
  // Separate key and IV
28041
28046
  var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
@@ -28082,7 +28087,7 @@ module.exports = parent;
28082
28087
  cfg = this.cfg.extend(cfg);
28083
28088
 
28084
28089
  // Derive key and other params
28085
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
28090
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);
28086
28091
 
28087
28092
  // Add IV to config
28088
28093
  cfg.iv = derivedParams.iv;
@@ -28121,7 +28126,7 @@ module.exports = parent;
28121
28126
  ciphertext = this._parse(ciphertext, cfg.format);
28122
28127
 
28123
28128
  // Derive key and other params
28124
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
28129
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);
28125
28130
 
28126
28131
  // Add IV to config
28127
28132
  cfg.iv = derivedParams.iv;
@@ -29459,7 +29464,7 @@ module.exports = parent;
29459
29464
  var M_offset_14 = M[offset + 14];
29460
29465
  var M_offset_15 = M[offset + 15];
29461
29466
 
29462
- // Working varialbes
29467
+ // Working variables
29463
29468
  var a = H[0];
29464
29469
  var b = H[1];
29465
29470
  var c = H[2];