bwLehrpool Masterserver
Manages authentication and sharing of virtual machines between participating institutions
Static Public Member Functions | Static Private Attributes | List of all members
org.openslx.imagemaster.util.RandomString Class Reference

Generate secure random strings. More...

+ Collaboration diagram for org.openslx.imagemaster.util.RandomString:

Static Public Member Functions

static String generate (int length, boolean specialChars)
 Generate a random string. More...
 
static byte[] generateBinary (int length)
 Generate random binary data. More...
 

Static Private Attributes

static final String lettersSpecial = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890+-$%&/()=?@"
 
static final String letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
 
static final SecureRandom random = new SecureRandom()
 

Detailed Description

Generate secure random strings.

Definition at line 9 of file RandomString.java.

Member Function Documentation

static String org.openslx.imagemaster.util.RandomString.generate ( int  length,
boolean  specialChars 
)
static

Generate a random string.

Parameters
lengththe length of the string
specialCharswhether to use special charachters or not
Returns
the generated string

Definition at line 22 of file RandomString.java.

static byte [] org.openslx.imagemaster.util.RandomString.generateBinary ( int  length)
static

Generate random binary data.

Parameters
lengthnumber of bytes to generate
Returns
the generated binary data, as byte array

Definition at line 39 of file RandomString.java.

+ Here is the caller graph for this function:

Member Data Documentation

final String org.openslx.imagemaster.util.RandomString.letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
staticprivate

Definition at line 12 of file RandomString.java.

final String org.openslx.imagemaster.util.RandomString.lettersSpecial = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890+-$%&/()=?@"
staticprivate

Definition at line 11 of file RandomString.java.

final SecureRandom org.openslx.imagemaster.util.RandomString.random = new SecureRandom()
staticprivate

Definition at line 13 of file RandomString.java.


The documentation for this class was generated from the following file: