}
Biff8EncryptionKey key;
if (fpr.getRc4KeyData() != null) {
Rc4KeyData rc4 = fpr.getRc4KeyData();
Biff8RC4Key rc4key = Biff8RC4Key.create(userPassword, rc4.getSalt());
key = rc4key;
if (!rc4key.validate(rc4.getEncryptedVerifier(), rc4.getEncryptedVerifierHash())) {
throw new EncryptedDocumentException(
(Decryptor.DEFAULT_PASSWORD.equals(userPassword) ? "Default" : "Supplied")
+ " password is invalid for salt/verifier/verifierHash");
}
} else if (fpr.getXorKeyData() != null) {