|
Sun Adapter for LDAP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.ldapadapter.utils.cryptography.impl.KeyStoreUtilImpl
public class KeyStoreUtilImpl
Provides a KeyStoreUtil implementation. The getInstance(Map aProperties) factory method returnes a new instance of this implementation each time. So it does not provide a singlton and does not pool any instances.
Use the KEYSTORE_URL_PROPERTY_KEY, KEYSTORE_TYPE_PROPERTY_KEY, KEYSTORE_PASSWORD_PROPERTY_KEY keys to set the desired values in the property map when acquiring an instance.
KeyStoreUtil
Field Summary |
---|
Fields inherited from interface com.stc.connector.ldapadapter.utils.cryptography.api.KeyStoreUtil |
---|
KEYSTORE_PASSWORD_PROPERTY_KEY, KEYSTORE_TYPE_PROPERTY_KEY, KEYSTORE_URL_PROPERTY_KEY |
Method Summary | |
---|---|
void |
addSymmetricKeyToKeyStore(int aKeySize,
java.lang.String aAlgorithm,
java.lang.String aAlias,
char[] aPassword)
Geneartes a symmetric key(secret key) and stores it in the keystore. |
static KeyStoreUtil |
getInstance(java.util.Map aProperties)
Returns a new instance of a KeyStoreUtil based on the specified properties. |
java.security.Key |
getKey(java.lang.String aAlias,
char[] aPassword)
Returns the key stored in the keystore under the specified alias and password. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static KeyStoreUtil getInstance(java.util.Map aProperties)
Use the KEYSTORE_URL_PROPERTY_KEY, KEYSTORE_TYPE_PROPERTY_KEY, KEYSTORE_PASSWORD_PROPERTY_KEY keys to set the desired values in the property map when acquiring an instance.
aProperties
- The map view of the properties to use in getting the instance.
java.lang.SecurityException
- Thrown when failed to create a new instance.public void addSymmetricKeyToKeyStore(int aKeySize, java.lang.String aAlgorithm, java.lang.String aAlias, char[] aPassword)
KeyStoreUtil
addSymmetricKeyToKeyStore
in interface KeyStoreUtil
aKeySize
- The key size.aAlgorithm
- The name of the algorithm.aAlias
- The alias name.aPassword
- The password for the key.KeyStoreUtil#genSymmetricKey
public java.security.Key getKey(java.lang.String aAlias, char[] aPassword)
KeyStoreUtil
getKey
in interface KeyStoreUtil
aAlias
- The alias name.aPassword
- The password for the key.
KeyStoreUtil.getKey(java.lang.String, char[])
public static void main(java.lang.String[] args)
|
Sun Adapter for LDAP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |