decrypt.setupByOwnerPassword(documentID, password, uValue, oValue, pValue);
if (!equalsArray(uValue, decrypt.userKey, (rValue == 3 || rValue == 4) ? 16 : 32)) {
//check by user password
decrypt.setupByUserPassword(documentID, password, oValue, pValue);
if (!equalsArray(uValue, decrypt.userKey, (rValue == 3 || rValue == 4) ? 16 : 32)) {
throw new BadPasswordException(MessageLocalization.getComposedMessage("bad.user.password"));
}
}
else
ownerPasswordUsed = true;
}