JSS CryptoStore

From Dogtag
Revision as of 01:28, 12 July 2018 by Edewata (talk | contribs) (Private Keys)

Jump to: navigation, search

Getting CryptoStore

CryptoToken token = ...
CryptoStore store = token.getCryptoStore();

Certificates

To get all certificates:

X509Certificate certs = store.getCertificates();

To delete a certificate:

store.deleteCert(cert);

Public Keys

To get all public keys:

PublicKey[] publicKeys = store.getPublicKeys();

To delete a public key:

store.deletePublicKey(publicKey);

Private Keys

To get all private keys:

PrivateKey[] privateKeys = store.getPrivateKeys();

To delete a private key:

store.deletePrivateKey(privateKey);

Symmetric Keys

To get all symmetric keys:

SymmetricKey[] symmetricKeys = store.getSymmetricKeys();

To delete a symmetric key:

store.deleteSymmetricKey(symmetricKey);

References