You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.
SecureRandom r = new SecureRandom();
byte[] ivBytes = new byte[16];
r.nextBytes(ivBytes);
cipher.init(Cipher.ENCRYPT_MODE, keySpec, new IvParameterSpec(ivBytes));
but i have no idea how to replace the line51 with the above to keep it safe, so no pull request from my side
Looks like SecureRandom will work but there's one possible problem with that.
According to the Java docs (https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html) SecureRandom could possibly block the thread that calls .nextBytes(...).
I haven't dived into where the constructor lies for this class but if it's on a thread such as the main UI thread then the solution might not be as simple as a one-liner
DELETED
The text was updated successfully, but these errors were encountered: