Skip to content

Commit 19b3560

Browse files
committed
Externs
1 parent 9a82ec3 commit 19b3560

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

bcrypt.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,11 +794,13 @@
794794
}
795795
}
796796

797+
// crypto.getRandomValues polyfill to use
797798
var _getRandomValues = null;
798-
799+
799800
/**
800801
* Sets the polyfill that should be used if window.crypto.getRandomValues is not available.
801802
* @param {function(Uint32Array)} getRandomValues The actual implementation
803+
* @expose
802804
*/
803805
bcrypt.setRandomPolyfill = function(getRandomValues) {
804806
_getRandomValues = getRandomValues;

bcrypt.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

externs/bcrypt.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
*/
2626
var bcrypt = {};
2727

28+
/**
29+
* @param {Uint32Array} array
30+
*/
31+
bcrypt.setRandomPolyfill = function(array) {};
32+
2833
/**
2934
* @param {number=} rounds
3035
* @param {number=} seed_length

src/bcrypt.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,13 @@
672672
}
673673
}
674674

675+
// crypto.getRandomValues polyfill to use
675676
var _getRandomValues = null;
676-
677+
677678
/**
678679
* Sets the polyfill that should be used if window.crypto.getRandomValues is not available.
679680
* @param {function(Uint32Array)} getRandomValues The actual implementation
681+
* @expose
680682
*/
681683
bcrypt.setRandomPolyfill = function(getRandomValues) {
682684
_getRandomValues = getRandomValues;

0 commit comments

Comments
 (0)