public class Base64StringKeyGenerator extends java.lang.Object implements StringKeyGenerator
BytesKeyGenerator
for the actual key generation.Constructor and Description |
---|
Base64StringKeyGenerator()
Creates an instance with keyLength of 32 bytes and standard Base64 encoding.
|
Base64StringKeyGenerator(java.util.Base64.Encoder encoder)
Creates an instance with keyLength of 32 bytes and the provided encoder.
|
Base64StringKeyGenerator(java.util.Base64.Encoder encoder,
int keyLength)
Creates an instance with the provided key length and encoder.
|
Base64StringKeyGenerator(int keyLength)
Creates an instance with the provided key length in bytes and standard Base64
encoding.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateKey() |
public Base64StringKeyGenerator()
public Base64StringKeyGenerator(int keyLength)
keyLength
- the key length in bytespublic Base64StringKeyGenerator(java.util.Base64.Encoder encoder)
encoder
- the encoder to usepublic Base64StringKeyGenerator(java.util.Base64.Encoder encoder, int keyLength)
encoder
- the encoder to usekeyLength
- the key length to usepublic java.lang.String generateKey()
generateKey
in interface StringKeyGenerator