GeeCON Prague 2014*
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


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: 42028
    
  64
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
 
GeeCON Prague 2014
 
subject: SecureRandom & Base64