This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e7a6a1
commit 0c38f16
Showing
8 changed files
with
4 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 3 additions & 14 deletions
17
java/src/main/java/org/whispersystems/curve25519/JCESecureRandomProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |