enc.confirmPassword(password); } else { byte verifier[] = dec.getVerifier(); byte salt[] = ver.getSalt(); enc.confirmPassword(password, null, null, verifier, salt, null);
protected Record[] updateEncryptionRecord(Record records[]) { String password = Biff8EncryptionKey.getCurrentUserPassword(); if (password == null) { if (dea == null) { // no password given, no encryption record exits -> done return records; } else { // need to remove password data dea = null; return removeEncryptionRecord(records); } } else { // create password record if (dea == null) { dea = new DocumentEncryptionAtom(); } EncryptionInfo ei = dea.getEncryptionInfo(); byte salt[] = ei.getVerifier().getSalt(); Encryptor enc = getEncryptionInfo().getEncryptor(); if (salt == null) { enc.confirmPassword(password); } else { byte verifier[] = ei.getDecryptor().getVerifier(); enc.confirmPassword(password, null, null, verifier, salt, null); } // move EncryptionRecord to last slide position records = normalizeRecords(records); return addEncryptionRecord(records, dea); } }
protected void updateEncryptionInfo() { // make sure, that we've read all the streams ... readProperties(); // now check for the password String password = Biff8EncryptionKey.getCurrentUserPassword(); FibBase fBase = _fib.getFibBase(); if (password == null) { fBase.setLKey(0); fBase.setFEncrypted(false); fBase.setFObfuscated(false); _encryptionInfo = null; } else { // create password record if (_encryptionInfo == null) { _encryptionInfo = new EncryptionInfo(EncryptionMode.cryptoAPI); fBase.setFEncrypted(true); fBase.setFObfuscated(false); } Encryptor enc = _encryptionInfo.getEncryptor(); byte salt[] = _encryptionInfo.getVerifier().getSalt(); if (salt == null) { enc.confirmPassword(password); } else { byte verifier[] = _encryptionInfo.getDecryptor().getVerifier(); enc.confirmPassword(password, null, null, verifier, salt, null); } } }
enc.confirmPassword(password); } else { byte verifier[] = dec.getVerifier(); byte salt[] = ver.getSalt(); enc.confirmPassword(password, null, null, verifier, salt, null);