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

SecureRandom & Base64

James Dekker
Ranch Hand

Joined: Dec 09, 2006
Posts: 221

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,

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: SecureRandom & Base64
It's not a secret anymore!