From 969e39dcf207761912f1539060d02d16315201d3 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 24 Mar 2016 13:49:26 +0800 Subject: [PATCH] Rename useAEAD --> nativeAEAD --- src/openpgp.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openpgp.js b/src/openpgp.js index b0b35f4e..0a5cacf3 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -158,7 +158,7 @@ export function decryptKey({ privateKey, passphrase }) { export function encrypt({ data, publicKeys, privateKeys, passwords, filename, armor=true }) { checkData(data); publicKeys = toArray(publicKeys); privateKeys = toArray(privateKeys); passwords = toArray(passwords); - if (!useAEAD() && asyncProxy) { // use web worker if web crypto apis are not supported + if (!nativeAEAD() && asyncProxy) { // use web worker if web crypto apis are not supported return asyncProxy.delegate('encrypt', { data, publicKeys, privateKeys, passwords, filename, armor }); } @@ -200,7 +200,7 @@ export function encrypt({ data, publicKeys, privateKeys, passwords, filename, ar export function decrypt({ message, privateKey, publicKeys, sessionKey, password, format='utf8' }) { checkMessage(message); publicKeys = toArray(publicKeys); - if (!useAEAD() && asyncProxy) { // use web worker if web crypto apis are not supported + if (!nativeAEAD() && asyncProxy) { // use web worker if web crypto apis are not supported return asyncProxy.delegate('decrypt', { message, privateKey, publicKeys, sessionKey, password, format }); } @@ -475,10 +475,10 @@ function onError(message, error) { } /** - * Check for AES-GCM support and configuration by the user. Note that only browsers that - * implement the current WebCrypto specification support AES-GCM. + * Check for AES-GCM support and configuration by the user. Only browsers that + * implement the current WebCrypto specification support native AES-GCM. * @return {Boolean} If authenticated encryption should be used */ -function useAEAD() { +function nativeAEAD() { return util.getWebCrypto() && config.aead_protect; } \ No newline at end of file