mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Removed redundant parameter checks.
This commit is contained in:
@@ -296,10 +296,6 @@ class CryptoComponentImpl implements CryptoComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SecretKey deriveKey(byte[] secret, byte[] label, long context) {
|
private SecretKey deriveKey(byte[] secret, byte[] label, long context) {
|
||||||
if(secret.length != CIPHER_KEY_BYTES)
|
|
||||||
throw new IllegalArgumentException();
|
|
||||||
if(Arrays.equals(secret, BLANK_SECRET))
|
|
||||||
throw new IllegalArgumentException();
|
|
||||||
byte[] key = counterModeKdf(secret, label, context);
|
byte[] key = counterModeKdf(secret, label, context);
|
||||||
return new SecretKeyImpl(key);
|
return new SecretKeyImpl(key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user