Package org.jgroups.demos
Class KeyStoreGenerator
java.lang.Object
org.jgroups.demos.KeyStoreGenerator
Generates a keystore file that has a SecretKey in it. It is not possible to
use keytool to achieve this. This is a simple way to generate a
JCEKS format keystore and SecretKey.
Usage is --alg ALGNAME --size ALGSIZE --storeName FILENAME --storePass PASSWORD --alias KEYALIAS
Any of args are optional and will default to
- ALGNAME = Blowfish
- ALGSIZE = 56
- FILENAME = defaultStore.keystore
- PASSWORD = changeit
- ALIAS = mykey
-
Field Details
-
symAlg
-
keySize
static int keySize -
keyStoreName
-
storePass
-
alias
-
storeType
-
-
Constructor Details
-
KeyStoreGenerator
private KeyStoreGenerator()
-
-
Method Details
-
main
-
help
protected static void help() -
createSecretKey
- Throws:
Exception
-
createSecretKey
public static SecretKey createSecretKey(String sym_alg, int key_size) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
getAlgorithm
-