use web worker for reformatKey
This commit is contained in:
parent
4044501d6d
commit
5fb23ac833
|
@ -126,7 +126,7 @@ export function generateKey({ userIds=[], passphrase, numBits=2048, unlocked=fal
|
||||||
export function reformatKey({ privateKey, userIds=[], passphrase="", unlocked=false, keyExpirationTime=0 } = {}) {
|
export function reformatKey({ privateKey, userIds=[], passphrase="", unlocked=false, keyExpirationTime=0 } = {}) {
|
||||||
const options = formatUserIds({ privateKey, userIds, passphrase, unlocked, keyExpirationTime });
|
const options = formatUserIds({ privateKey, userIds, passphrase, unlocked, keyExpirationTime });
|
||||||
|
|
||||||
if (!util.getWebCryptoAll() && asyncProxy) { // use web worker if web crypto apis are not supported
|
if (asyncProxy) {
|
||||||
return asyncProxy.delegate('reformatKey', options);
|
return asyncProxy.delegate('reformatKey', options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user