mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Added a random salt to prevent ID clashes between anonymous messages.
This commit is contained in:
@@ -8,6 +8,7 @@ import java.security.KeyPairGenerator;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.Security;
|
||||
import java.security.Signature;
|
||||
import java.util.Arrays;
|
||||
@@ -205,6 +206,11 @@ class CryptoComponentImpl implements CryptoComponent {
|
||||
}
|
||||
}
|
||||
|
||||
public SecureRandom getSecureRandom() {
|
||||
// FIXME: Implement a PRNG (pony/rainbow/nyancat generator)
|
||||
return new SecureRandom();
|
||||
}
|
||||
|
||||
public Signature getSignature() {
|
||||
try {
|
||||
return Signature.getInstance(SIGNATURE_ALGO, PROVIDER);
|
||||
|
||||
Reference in New Issue
Block a user