mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
22 lines
557 B
Java
22 lines
557 B
Java
package org.briarproject.api.crypto;
|
|
|
|
/** A secret key used for encryption and/or authentication. */
|
|
public interface SecretKey {
|
|
|
|
/** Returns the encoded representation of this key. */
|
|
byte[] getEncoded();
|
|
|
|
/**
|
|
* Returns a copy of this key - erasing this key will erase the copy and
|
|
* vice versa.
|
|
*/
|
|
SecretKey copy();
|
|
|
|
/**
|
|
* Erases this key from memory. Any copies derived from this key via the
|
|
* {@link #copy()} method, and any keys from which this key was derived via
|
|
* the {@link #copy()} method, are also erased.
|
|
*/
|
|
void erase();
|
|
}
|