This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39543
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SecureRandom & Base64
 
Similar Threads
RSA Cipher
AES Encryption Service
KeyGenerator using JCE
Triple DES encrytpion and decryption using 256 bit and 512 bit
AES decryption - InvalidKeyException: Parameters missing