private static String createSecureRandom ( ) { try { final String no = "" + SECURE_RANDOM . nextInt ( ) ; final MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; final byte [ ] digest = md . digest ( no . getBytes ( ) ) ; return encodeBase64 ( digest ) ; } catch ( final NoSuchAlgorithmException ex ) { throw new RuntimeException ( ex ) ; } }
Creates a encoded secure random string .