| java.lang.Object | |
| ↳ | org.springframework.security.crypto.keygen.KeyGenerators | 
Factory for commonly used key generators.
 Public API for constructing a BytesKeyGenerator or StringKeyGenerator.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Create a  BytesKeyGeneratorthat uses aSecureRandomto generate keys of 8 bytes in length. | |||||||||||
| Create a  BytesKeyGeneratorthat uses aSecureRandomto generate keys of a custom length. | |||||||||||
| Create a  BytesKeyGeneratorthat returns a single, sharedSecureRandomkey of a custom length. | |||||||||||
| Creates a  StringKeyGeneratorthat hex-encodesSecureRandomkeys of 8 bytes in length. | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  java.lang.Object | |||||||||||
Create a BytesKeyGenerator that uses a SecureRandom to generate keys of 8 bytes in length.
Create a BytesKeyGenerator that uses a SecureRandom to generate keys of a custom length.
| keyLength | the key length in bytes, e.g. 16, for a 16 byte key. | 
|---|
Create a BytesKeyGenerator that returns a single, shared SecureRandom key of a custom length.
| keyLength | the key length in bytes, e.g. 16, for a 16 byte key. | 
|---|
Creates a StringKeyGenerator that hex-encodes SecureRandom keys of 8 bytes in length.
 The hex-encoded string is keyLength * 2 characters in length.