org.mozilla.jss.crypto
Interface PrivateKey


public interface PrivateKey
extends java.security.PrivateKey

Private Keys used by JSS. All the private keys handled by JSS are of this type, which is a subtype of java.security.PrivateKey.


Inner Class Summary
static class PrivateKey.Type
           
 
Field Summary
static PrivateKey.Type DSA
           
static PrivateKey.Type RSA
           
 
Fields inherited from interface java.security.PrivateKey
serialVersionUID
 
Fields inherited from interface java.security.Key
serialVersionUID
 
Method Summary
 CryptoToken getOwningToken()
          Returns the CryptoToken that owns this private key.
 int getStrength()
          Returns the size, in bits, of the modulus of an RSA key.
 PrivateKey.Type getType()
          Returns the type (RSA or DSA) of this private key.
 byte[] getUniqueID()
          Returns the unique ID of this key.
 
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
 

Field Detail

RSA

public static final PrivateKey.Type RSA

DSA

public static final PrivateKey.Type DSA
Method Detail

getType

public PrivateKey.Type getType()
Returns the type (RSA or DSA) of this private key.

getUniqueID

public byte[] getUniqueID()
                   throws TokenException
Returns the unique ID of this key. Unique IDs can be used to match certificates to keys.
See Also:
TokenCertificate.getUniqueID()

getStrength

public int getStrength()
Returns the size, in bits, of the modulus of an RSA key. Returns -1 for other types of keys.

getOwningToken

public 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.