public class HeliosKeyStoreManager extends java.lang.Object implements HeliosKeyStore
HeliosKeyStore.| Constructor and Description |
|---|
HeliosKeyStoreManager(android.content.Context context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAlias(java.lang.String alias)
Delete an item in the key store.
|
java.lang.String[] |
getAliases()
Get the aliases (names) of all items in the key store.
|
java.security.cert.Certificate |
retrieveCertificate(java.lang.String alias,
java.lang.String passPhrase)
Retrieves a certificate from the key store.
|
java.security.PrivateKey |
retrievePrivateKey(java.lang.String alias,
java.lang.String passPhrase)
Retrieves a private RSA key from the key store.
|
javax.crypto.SecretKey |
retrieveSecretKey(java.lang.String alias,
java.lang.String passPhrase)
Retrieves an AES key from the key store.
|
void |
storeCertificate(java.security.cert.Certificate cert,
java.lang.String alias,
java.lang.String passPhrase)
Stores a certificate to the key store.
|
void |
storePrivateKey(java.security.PrivateKey rsaKey,
java.lang.String alias,
java.lang.String passPhrase)
Stores a private RSA key (and a self signed certificate) to the key store.
|
void |
storeSecretKey(javax.crypto.SecretKey aesKey,
java.lang.String alias,
java.lang.String passPhrase)
Stores an AES key to the key store.
|
public HeliosKeyStoreManager(android.content.Context context)
context - Context to be used in operations.public void storeSecretKey(javax.crypto.SecretKey aesKey,
java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStorestoreSecretKey in interface HeliosKeyStoreaesKey - The key to be stored SecretKeyalias - The name assigned for the keypassPhrase - The password for the keyHeliosKeyStoreException - if the operation fails.public javax.crypto.SecretKey retrieveSecretKey(java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStoreretrieveSecretKey in interface HeliosKeyStorealias - The name of the keypassPhrase - The password of the keySecretKeyHeliosKeyStoreException - if the operation fails.public void storePrivateKey(java.security.PrivateKey rsaKey,
java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStorestorePrivateKey in interface HeliosKeyStorersaKey - The RSA key that is to be stored PrivateKeyalias - The name assigned for the keypassPhrase - The password for the keyHeliosKeyStoreException - if the operation fails.public java.security.PrivateKey retrievePrivateKey(java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStoreretrievePrivateKey in interface HeliosKeyStorealias - The name of the keypassPhrase - The password of the keyPrivateKeyHeliosKeyStoreException - if the operation fails.public void storeCertificate(java.security.cert.Certificate cert,
java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStorestoreCertificate in interface HeliosKeyStorecert - The certificate to be stored Certificatealias - The name assigned for the certificatepassPhrase - The password for the certificateHeliosKeyStoreException - if the operation fails.public java.security.cert.Certificate retrieveCertificate(java.lang.String alias,
java.lang.String passPhrase)
throws HeliosKeyStoreException
HeliosKeyStoreretrieveCertificate in interface HeliosKeyStorealias - The name of the certificatepassPhrase - The password of the certificateCertificateHeliosKeyStoreException - if the operation fails.public java.lang.String[] getAliases()
throws HeliosKeyStoreException
HeliosKeyStoregetAliases in interface HeliosKeyStoreHeliosKeyStoreException - if the operation fails.public void deleteAlias(java.lang.String alias)
throws HeliosKeyStoreException
HeliosKeyStoredeleteAlias in interface HeliosKeyStorealias - The name of the item to be deleted from the key storeHeliosKeyStoreException