Remove unnecessary else if when checking the encryptionKey in the CipherTransformFactory constructor
This can be simplified a tiny bit since we already throw `PasswordException` when no password is provided.
This commit is contained in:
parent
cc63ffa6bb
commit
0e15f709c4
@ -1125,12 +1125,13 @@ class CipherTransformFactory {
|
|||||||
perms
|
perms
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!encryptionKey && !password) {
|
if (!encryptionKey) {
|
||||||
throw new PasswordException(
|
if (!password) {
|
||||||
"No password given",
|
throw new PasswordException(
|
||||||
PasswordResponses.NEED_PASSWORD
|
"No password given",
|
||||||
);
|
PasswordResponses.NEED_PASSWORD
|
||||||
} else if (!encryptionKey && password) {
|
);
|
||||||
|
}
|
||||||
// Attempting use the password as an owner password
|
// Attempting use the password as an owner password
|
||||||
const decodedPassword = this.#decodeUserPassword(
|
const decodedPassword = this.#decodeUserPassword(
|
||||||
passwordBytes,
|
passwordBytes,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user