Re-encrypt the DB key with the stored key.

This commit is contained in:
akwizgran
2020-01-09 14:32:11 +00:00
parent d7b05dcba0
commit c11d09a885
4 changed files with 58 additions and 2 deletions

View File

@@ -153,6 +153,13 @@ public interface CryptoComponent {
byte[] decryptWithPassword(byte[] ciphertext, String password,
@Nullable KeyStoreConfig keyStoreConfig);
/**
* Returns true if the given ciphertext was encrypted using a stored key
* to strengthen the password-based key. The validity of the ciphertext is
* not checked.
*/
boolean isEncryptedWithStoredKey(byte[] ciphertext);
/**
* Encrypts the given plaintext to the given public key.
*/