cryptolib.diff 809 B

12345678910111213141516171819202122232425
  1. @@ -0,0 +1,24 @@
  2. +diff --git a/crypto/lib/crypto-lib.js b/crypto/lib/crypto-lib.js
  3. +index 5cd9994..6fb1459 100644
  4. +--- a/crypto/lib/crypto-lib.js
  5. ++++ b/crypto/lib/crypto-lib.js
  6. +@@ -379,6 +379,9 @@ function cryptolib() {
  7. + var callback = args.pop();
  8. +
  9. + this.policies = callback.policies || cryptolibPolicies;
  10. ++ if ( !cryptolibPolicies ) {
  11. ++ cryptolibPolicies = this.policies;
  12. ++ }
  13. + this.prng = callback.prng || cryptoPRNG.getPRNG();
  14. +
  15. + // modules can be passed as an array or as individual parameters
  16. +@@ -12103,3 +12106,9 @@ cryptolib.modules.symmetric.service = function (box) {
  17. + arrayDataBase64);
  18. + };
  19. + };
  20. ++
  21. ++cryptolib.cryptoPRNG = cryptoPRNG;
  22. ++cryptolib.Config = Config;
  23. ++if (typeof module !== 'undefined') {
  24. ++ module.exports = cryptolib;
  25. ++};