This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes SecureRandom & Base64 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "SecureRandom & Base64" Watch "SecureRandom & Base64" New topic
Author

SecureRandom & Base64

James Dekker
Ranch Hand

Joined: Dec 09, 2006
Posts: 215
All,

Am new to this...

What is the *BEST* way to create a SecureRandom number and then convert it to BASE64?

This is what I have so far:



Thank you,

James
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
I'm not sure that there is "a best way". The way you're using it seems fine, although I'd probably use a different library for base-64 encoding (like Jakarta Commons Codec). But that's a minor detail.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SecureRandom & Base64
 
Similar Threads
KeyGenerator using JCE
Triple DES encrytpion and decryption using 256 bit and 512 bit
AES decryption - InvalidKeyException: Parameters missing
RSA Cipher
AES Encryption Service