diff --git a/src/config/config.js b/src/config/config.js index 5ff9fba4..cb8561b4 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -29,6 +29,8 @@ * @module config/config */ +'use strict'; + var enums = require('../enums.js'); module.exports = { @@ -40,8 +42,7 @@ module.exports = { // fail on decrypt if message is not integrity protected ignore_mdc_error: false, rsa_blinding: true, - useWebCrypto: true, - useNative: false, // Node crypto library for AES + useNative: true, // use native node.js crypto and Web Crypto apis (if available) show_version: true, show_comment: true, diff --git a/src/util.js b/src/util.js index 50057fc3..a0d7af54 100644 --- a/src/util.js +++ b/src/util.js @@ -396,11 +396,11 @@ module.exports = { /** * Get native Web Cryptography api. The default configuration is to use - * the api when available. But it can also be deactivated with config.useWebCrypto + * the api when available. But it can also be deactivated with config.useNative * @return {Object} The SubtleCrypto api or 'undefined' */ getWebCrypto: function() { - if (config.useWebCrypto === false) { + if (!config.useNative) { // make web crypto optional return; }