Rename useAEAD --> nativeAEAD
This commit is contained in:
parent
2dce233d10
commit
969e39dcf2
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user