summaryrefslogtreecommitdiffhomepage
path: root/app/src/main
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-05-02 10:30:54 -0500
committerSamuel Holland <samuel@sholland.org>2018-05-02 10:31:25 -0500
commite8d8d5dc29255fe72844e60d578c67394fa2031a (patch)
tree13313d18458acfe05eb4efffa94ad2dea529ca69 /app/src/main
parent3e8d4575015dea12ec1edf87ffa5b9362ae0bb3e (diff)
Keypair: Minimize the scope of warning suppression
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/wireguard/crypto/Keypair.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/crypto/Keypair.java b/app/src/main/java/com/wireguard/crypto/Keypair.java
index 48decadb..3866efbf 100644
--- a/app/src/main/java/com/wireguard/crypto/Keypair.java
+++ b/app/src/main/java/com/wireguard/crypto/Keypair.java
@@ -11,7 +11,6 @@ import java.security.SecureRandom;
* Represents a Curve25519 keypair as used by WireGuard.
*/
-@SuppressWarnings("MagicNumber")
public class Keypair {
private final byte[] privateKey;
private final byte[] publicKey;
@@ -29,6 +28,7 @@ public class Keypair {
this(KeyEncoding.keyFromBase64(privateKey));
}
+ @SuppressWarnings("MagicNumber")
private static byte[] generatePrivateKey() {
final SecureRandom secureRandom = new SecureRandom();
final byte[] privateKey = new byte[KeyEncoding.KEY_LENGTH];