Package org.mozilla.jss.crypto
Interface PrivateKey
-
- All Superinterfaces:
javax.security.auth.Destroyable,java.security.Key,java.security.PrivateKey,java.io.Serializable
- All Known Implementing Classes:
PK11PrivKey
public interface PrivateKey extends java.security.PrivateKeyPrivate Keys used by JSS. All the private keys handled by JSS are of this type, which is a subtype of java.security.PrivateKey.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPrivateKey.Type
-
Field Summary
Fields Modifier and Type Field Description static PrivateKey.TypeDiffieHellmanstatic PrivateKey.TypeDSAstatic PrivateKey.TypeECstatic PrivateKey.TypeRSA
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CryptoTokengetOwningToken()Returns the CryptoToken that owns this private key.intgetStrength()Returns the size, in bits, of the modulus of an RSA key.PrivateKey.TypegetType()Returns the type (RSA or DSA) of this private key.byte[]getUniqueID()Returns the unique ID of this key.
-
-
-
Field Detail
-
RSA
static final PrivateKey.Type RSA
-
DSA
static final PrivateKey.Type DSA
-
EC
static final PrivateKey.Type EC
-
DiffieHellman
static final PrivateKey.Type DiffieHellman
-
-
Method Detail
-
getType
PrivateKey.Type getType()
Returns the type (RSA or DSA) of this private key.
-
getUniqueID
byte[] getUniqueID() throws TokenExceptionReturns the unique ID of this key. Unique IDs can be used to match certificates to keys.- Throws:
TokenException- See Also:
TokenCertificate.getUniqueID()
-
getStrength
int getStrength()
Returns the size, in bits, of the modulus of an RSA key. Returns -1 for other types of keys.
-
getOwningToken
CryptoToken getOwningToken()
Returns the CryptoToken that owns this private key. Cryptographic operations with this key may only be performed on the token that owns the key.
-
-