Package org.apereo.cas.util.gen
Class Base64RandomStringGenerator
- java.lang.Object
-
- org.apereo.cas.util.gen.AbstractRandomStringGenerator
-
- org.apereo.cas.util.gen.Base64RandomStringGenerator
-
- All Implemented Interfaces:
RandomStringGenerator
public class Base64RandomStringGenerator extends AbstractRandomStringGenerator
This isBase64RandomStringGenerator.URL safe base64 encoding implementation of the RandomStringGenerator that allows you to define the length of the random part.
- Since:
- 5.2.0
-
-
Field Summary
-
Fields inherited from class org.apereo.cas.util.gen.AbstractRandomStringGenerator
defaultLength, randomizer
-
Fields inherited from interface org.apereo.cas.util.gen.RandomStringGenerator
DEFAULT_LENGTH
-
-
Constructor Summary
Constructors Constructor Description Base64RandomStringGenerator(long defaultLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringconvertBytesToString(byte[] random)Converts byte[] to String by Base64 encoding.-
Methods inherited from class org.apereo.cas.util.gen.AbstractRandomStringGenerator
getAlgorithm, getNewString, getNewString, getNewStringAsBytes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apereo.cas.util.gen.RandomStringGenerator
getDefaultLength
-
-
-
-
Method Detail
-
convertBytesToString
protected java.lang.String convertBytesToString(byte[] random)
Converts byte[] to String by Base64 encoding.- Overrides:
convertBytesToStringin classAbstractRandomStringGenerator- Parameters:
random- raw bytes- Returns:
- a converted String
-
-