mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Added PBKDF2 to crypto component.
This commit is contained in:
@@ -96,15 +96,33 @@ public interface CryptoComponent {
|
||||
long connection);
|
||||
|
||||
/**
|
||||
* Encrypts the given plaintext so it can be written to temporary storage.
|
||||
* The ciphertext will not be decryptable after the app restarts.
|
||||
* Encrypts and authenticates the given plaintext so it can be written to
|
||||
* temporary storage. The ciphertext will not be decryptable after the app
|
||||
* restarts.
|
||||
*/
|
||||
byte[] encryptTemporaryStorage(byte[] plaintext);
|
||||
|
||||
/**
|
||||
* Decrypts the given ciphertext that has been read from temporary storage.
|
||||
* Returns null if the ciphertext is not decryptable (for example, if it
|
||||
* was written before the app restarted).
|
||||
* Decrypts and authenticates the given ciphertext that has been read from
|
||||
* temporary storage. Returns null if the ciphertext cannot be decrypted
|
||||
* and authenticated (for example, if it was written before the app
|
||||
* restarted).
|
||||
*/
|
||||
byte[] decryptTemporaryStorage(byte[] ciphertext);
|
||||
|
||||
/**
|
||||
* Encrypts and authenticates the given plaintext so it can be written to
|
||||
* storage. The encryption and authentication keys are derived from the
|
||||
* given password. The ciphertext will be decryptable using the same
|
||||
* password after the app restarts.
|
||||
*/
|
||||
byte[] encryptWithPassword(byte[] plaintext, char[] password);
|
||||
|
||||
/**
|
||||
* Decrypts and authenticates the given ciphertext that has been read from
|
||||
* storage. The encryption and authentication keys are derived from the
|
||||
* given password. Returns null if the ciphertext cannot be decrypted and
|
||||
* authenticated (for example, if the password is wrong).
|
||||
*/
|
||||
byte[] decryptWithPassword(byte[] ciphertext, char[] password);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user