Move PreKey ids to be Mediums, generate in circular buffer.

This commit is contained in:
Moxie Marlinspike
2013-08-19 10:07:07 -07:00
parent edb89ee3e9
commit d1969412fb
14 changed files with 153 additions and 43 deletions

View File

@@ -0,0 +1,5 @@
package org.whispersystems.textsecure.util;
public class Medium {
public static int MAX_VALUE = 0xFFF;
}

View File

@@ -119,4 +119,12 @@ public class Util {
return result.toString();
}
public static SecureRandom getSecureRandom() {
try {
return SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
}
}