|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.integration.password.KeyStoreUtil
public class KeyStoreUtil
Utility to handle Java Keystore
Constructor Summary | |
---|---|
KeyStoreUtil()
|
Method Summary | |
---|---|
static void |
createKeyStore(String path,
char[] storePass)
Create a Keystore |
static KeyPair |
generateKeyPair(String algo)
Generate a Key Pair |
static KeyStore |
getKeyStore(InputStream ksStream,
char[] storePass)
Get the Key Store Note: This method wants the InputStream to be not null. |
static KeyStore |
getKeyStore(String fileURL,
char[] storePass)
Get the Keystore given the url to the keystore file as a string |
static KeyStore |
getKeyStore(URL url,
char[] storePass)
Get the Keystore given the URL to the keystore |
static PublicKey |
getPublicKey(KeyStore ks,
String alias,
char[] password)
Get the Public Key from the keystore |
static void |
storeKeyPair(KeyStore ks,
String alias,
PublicKey publicKey,
PrivateKey privateKey,
char[] pass)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyStoreUtil()
Method Detail |
---|
public static void createKeyStore(String path, char[] storePass) throws Exception
storePass
-
Exception
public static KeyStore getKeyStore(String fileURL, char[] storePass) throws GeneralSecurityException, IOException
fileURL
- storePass
-
GeneralSecurityException
IOException
public static KeyStore getKeyStore(URL url, char[] storePass) throws GeneralSecurityException, IOException
url
- storePass
-
GeneralSecurityException
IOException
public static KeyStore getKeyStore(InputStream ksStream, char[] storePass) throws GeneralSecurityException, IOException
ksStream
- storePass
-
GeneralSecurityException
IOException
IllegalArgumentException
- if ksStream is nullpublic static KeyPair generateKeyPair(String algo) throws Exception
algo
- (RSA, DSA etc)
Exception
public static PublicKey getPublicKey(KeyStore ks, String alias, char[] password) throws Exception
ks
- alias
- password
-
Exception
public static void storeKeyPair(KeyStore ks, String alias, PublicKey publicKey, PrivateKey privateKey, char[] pass) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |