Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Include support for arm64 and amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
moxie-signal committed May 4, 2018
1 parent 0e7a6a1 commit 0c38f16
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion android/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
APP_ABI := armeabi armeabi-v7a x86 mips
APP_ABI := armeabi armeabi-v7a x86 mips arm64-v8a x86_64
Binary file added android/libs/arm64-v8a/libcurve25519.so
Binary file not shown.
Binary file modified android/libs/armeabi-v7a/libcurve25519.so
Binary file not shown.
Binary file modified android/libs/armeabi/libcurve25519.so
Binary file not shown.
Binary file modified android/libs/mips/libcurve25519.so
Binary file not shown.
Binary file modified android/libs/x86/libcurve25519.so
Binary file not shown.
Binary file added android/libs/x86_64/libcurve25519.so
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
/**
/*
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/

package org.whispersystems.curve25519;

import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

public class JCESecureRandomProvider implements SecureRandomProvider {

@Override
public void nextBytes(byte[] output) {
try {
SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
secureRandom.nextBytes(output);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
new SecureRandom().nextBytes(output);
}

@Override
public int nextInt(int maxValue) {
try {
SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
return secureRandom.nextInt(maxValue);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
return new SecureRandom().nextInt(maxValue);
}
}

0 comments on commit 0c38f16

Please sign in to comment.