org.mozilla.jss.crypto
Interface CryptoStore
- PK11Store
public interface CryptoStore
This is an interface for a permanent repository of cryptographic objects,
such as keys, certs, and passwords.
deletePrivateKey
public void deletePrivateKey(PrivateKey key)
throws NoSuchItemOnTokenException,
TokenException
Deletes the given PrivateKey from the CryptoToken.
This is a very dangerous call: it deletes the key from the underlying
token. After calling this, the PrivateKey passed in must no longer
be used, or a TokenException will occur.
key
- A PrivateKey to be permanently deleted. It must reside
on this token.
getCertificates
public X509Certificate[] getCertificates()
throws TokenException
Returns all user certificates stored on this token. A user certificate
is one that has a matching private key.
- An array of all user certificates present on this token.
TokenException
- If an error occurs on the token while
gathering the certificates.
getEncryptedPrivateKeyInfo
public byte[] getEncryptedPrivateKeyInfo(X509Certificate cert,
PBEAlgorithm pbeAlg,
Password pw,
int iteration)
getPrivateKeys
public PrivateKey[] getPrivateKeys()
throws TokenException
Returns all private keys stored on this token.
- An array of all private keys stored on this token.
TokenException
- If an error occurs on the token while
gathering the keys.