public class SecretKeyManager
extends java.lang.Object
Constructor and Description |
---|
SecretKeyManager() |
Modifier and Type | Method and Description |
---|---|
static javax.crypto.SecretKey |
generateKey()
Generates crypto key.
|
static javax.crypto.SecretKey |
loadKey(java.io.File file)
Loads crypto key from file.
|
static void |
saveKey(javax.crypto.SecretKey key,
java.io.File file)
Saves crypto key to file.
|
public static javax.crypto.SecretKey generateKey() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static void saveKey(javax.crypto.SecretKey key, java.io.File file) throws java.io.IOException
key
- file
- java.io.IOException
- if file not foundpublic static javax.crypto.SecretKey loadKey(java.io.File file) throws java.io.IOException
file
- java.io.IOException
- if file not found