mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-27 10:24:22 +00:00
randomizing masterkeys is now a explicit task, so random numbers are not needed when loading a masterkey file from disk. trying to use an uninitialized cryptor results in runtime exceptions
This commit is contained in:
@@ -22,6 +22,11 @@ public class AbstractCryptorDecorator implements Cryptor {
|
||||
this.cryptor = cryptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomizeMasterKey() {
|
||||
cryptor.randomizeMasterKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encryptMasterKey(OutputStream out, CharSequence password) throws IOException {
|
||||
cryptor.encryptMasterKey(out, password);
|
||||
|
||||
@@ -27,6 +27,11 @@ import org.cryptomator.crypto.exceptions.WrongPasswordException;
|
||||
*/
|
||||
public interface Cryptor extends Destroyable {
|
||||
|
||||
/**
|
||||
* Assigns new random bytes to the keys in this Cryptor instance.
|
||||
*/
|
||||
void randomizeMasterKey();
|
||||
|
||||
/**
|
||||
* Encrypts the current masterKey with the given password and writes the result to the given output stream.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user