edu.jhu.tmaj.util.crypt
Class KeyManagementUtil
java.lang.Object
edu.jhu.tmaj.util.crypt.KeyManagementUtil
final class KeyManagementUtil
- extends java.lang.Object
A utility class for creating, storing, or getting a key or iv.
Method Summary |
protected static void |
createAndWriteKeyAndIV()
creates a new key and initialation list and writes them to disk. |
(package private) static javax.crypto.Cipher |
getCipher()
|
static void |
main(java.lang.String[] args)
|
(package private) static byte[] |
retrieveIV()
|
(package private) static java.security.Key |
retrieveKey()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALGORITHM_NAME
static final java.lang.String ALGORITHM_NAME
- See Also:
- Constant Field Values
SECRET_KEY_FILE_NAME
static final java.lang.String SECRET_KEY_FILE_NAME
- See Also:
- Constant Field Values
IV_FILE_NAME
static final java.lang.String IV_FILE_NAME
- See Also:
- Constant Field Values
KeyManagementUtil
KeyManagementUtil()
retrieveKey
static java.security.Key retrieveKey()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
retrieveIV
static byte[] retrieveIV()
throws java.io.IOException
- Throws:
java.io.IOException
getCipher
static javax.crypto.Cipher getCipher()
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException
- Throws:
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
createAndWriteKeyAndIV
protected static void createAndWriteKeyAndIV()
- creates a new key and initialation list and writes them to disk. program exits upon
completion
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException