public interface KeyFactory
Factory interface for generating keys.
Modifier and Type | Field and Description |
---|---|
static KeyFactory |
AES
AES
KeyFactory implementation |
static KeyFactory |
DES
AES
KeyFactory implementation |
Modifier and Type | Method and Description |
---|---|
java.security.Key |
keyFromPassword(char[] password)
Derives and returns a strong key from a password.
|
java.security.Key |
randomKey()
Generates a strong random key.
|
java.security.Key |
randomKey(int size)
Generates a random key of size
size . |
static final KeyFactory AES
KeyFactory
implementationstatic final KeyFactory DES
KeyFactory
implementationjava.security.Key keyFromPassword(char[] password)
Derives and returns a strong key from a password.
password
- java.security.Key randomKey()
Generates a strong random key.
java.security.Key randomKey(int size)
Generates a random key of size size
.
size
-