| |
|
| java.lang.Object org.directwebremoting.util.IdGenerator
IdGenerator | public class IdGenerator (Code) | | Code to generate page ids.
IdGenerators are expensive to setup so it is suggested that you share
instances wherever possible. This action will also enhance security.
Much of this code is adapted from org.apache.catalina.session.ManagerBase.
Specifically Revision 1.37 which has been unchanged in the past 18 months.
I have taken out the /dev/urandom stuff and simplified things to the point
where we can audit it to work out what might be broken.
author: Joe Walker [joe at getahead dot ltd dot uk] |
Field Summary | |
final protected static String | DEFAULT_ALGORITHM The default message digest algorithm to use if we cannot use
the requested one. |
DEFAULT_ALGORITHM | final protected static String DEFAULT_ALGORITHM(Code) | | The default message digest algorithm to use if we cannot use
the requested one.
|
IdGenerator | public IdGenerator()(Code) | | Seed the random number
|
generateId | public synchronized String generateId(int length)(Code) | | Generate and return a new session identifier.
Parameters: length - The number of bytes to generate A new page id string |
getAlgorithm | public synchronized String getAlgorithm()(Code) | | the algorithm |
setAlgorithm | public synchronized void setAlgorithm(String algorithm)(Code) | | Parameters: algorithm - the algorithm to set |
|
|
|