Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.util
Class TokenUtils

java.lang.Object
  extended by oracle.adf.view.rich.util.TokenUtils


public class TokenUtils
extends java.lang.Object

A set of utilities for generating/working with random tokens. This class attempts to use the SecureRandom implementation recomended by Oracle Security in order to generate a cryptographically secure token. If it cannot, it will use the default SecureRandom implementation with optional seeds.


Method Summary
static long getLong()
          Returns a random long
static long getLong(byte[] seed)
          Returns a random long using a string
static java.security.SecureRandom getSecureRandom()
          Returns the current SecureRandom object, used for generating random sequences.
static java.security.SecureRandom getSecureRandom(byte[] seed)
          Returns the current SecureRandom object but sets an optional "seed" before returning the object.
static java.lang.String getToken()
          Generates a string-based token
static java.lang.String getToken(byte[] seed)
          Generatesa string-based token using a seed

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getSecureRandom

public static java.security.SecureRandom getSecureRandom()
Returns the current SecureRandom object, used for generating random sequences.
Returns:

getSecureRandom

public static java.security.SecureRandom getSecureRandom(byte[] seed)
Returns the current SecureRandom object but sets an optional "seed" before returning the object.
Parameters:
seed -
Returns:

getToken

public static java.lang.String getToken()
Generates a string-based token
Returns:

getToken

public static java.lang.String getToken(byte[] seed)
Generatesa string-based token using a seed
Parameters:
seed -
Returns:

getLong

public static long getLong()
Returns a random long
Returns:

getLong

public static long getLong(byte[] seed)
Returns a random long using a string
Parameters:
seed -
Returns:

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.