mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Arrays.copyOfRange() is not available in Java 5.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package net.sf.briar.crypto;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
/**
|
||||
@@ -35,7 +33,9 @@ class SharedSecret {
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
ciphertext = Arrays.copyOfRange(secret, IV_BYTES + 1, secret.length);
|
||||
ciphertext = new byte[secret.length - IV_BYTES - 1];
|
||||
System.arraycopy(secret, IV_BYTES + 1, ciphertext, 0,
|
||||
ciphertext.length);
|
||||
}
|
||||
|
||||
SharedSecret(IvParameterSpec iv, boolean alice, byte[] ciphertext) {
|
||||
|
||||
Reference in New Issue
Block a user