Register / Login
Win a copy of
Kotlin in Action
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Java Micro Edition
generate securerandom in bouncy castle
posted 7 years ago
Im trying to use bouncy castle FixedSecureRandom to generate AES key. Before that I tried to use
and my code was like this:
SecureRandom sr = new SecureRandom(); AESkey = new byte ; sr.nextBytes(AESkey);
the system throws noclassdeffounderror. Then I did obfuscation using Netbeans to the highest level but the problem still.
Then I changed my code to this:
FixedSecureRandom fsr = (FixedSecureRandom)FixedSecureRandom.getInstance("SHA1PRNG"); AESkey = new byte ; fsr.nextBytes(AESkey);
the same error is was throwen at first line. Note this code
run in mobile side.
Any idea?Any help?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
java in the sharp zaurus PDA
Bouncy Castle encryption examples and tutorials
Encrypting a serialized object
pad block corrupted
Bouncy Castle: PGPKeyRingGenerator