mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
19 lines
370 B
Java
19 lines
370 B
Java
package org.briarproject.api.crypto;
|
|
|
|
/** A secret key used for encryption and/or authentication. */
|
|
public class SecretKey {
|
|
|
|
public static final int LENGTH = 32; // Bytes
|
|
|
|
private final byte[] key;
|
|
|
|
public SecretKey(byte[] key) {
|
|
if (key.length != LENGTH) throw new IllegalArgumentException();
|
|
this.key = key;
|
|
}
|
|
|
|
public byte[] getBytes() {
|
|
return key;
|
|
}
|
|
}
|