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