diff --git a/src/util.js b/src/util.js index 8b16a133..97612f5d 100644 --- a/src/util.js +++ b/src/util.js @@ -307,6 +307,11 @@ module.exports = { return "unknown"; }, + /** + * Get native Web Cryptography api. The default configuration is to use + * the api when available. But it can also be deactivated with config.useWebCrypto + * @return {Object} The SubtleCrypto api or 'undefined' + */ getWebCrypto: function() { if (config.useWebCrypto === false) { // make web crypto optional