org.mozilla.jss.crypto

Interface PrivateKey

public interface PrivateKey extends 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.
Nested Class Summary
static classPrivateKey.Type
Field Summary
static PrivateKey.TypeDiffieHellman
static PrivateKey.TypeDSA
static PrivateKey.TypeEC
static PrivateKey.TypeRSA
Method Summary
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

DiffieHellman

public static final PrivateKey.Type DiffieHellman

DSA

public static final PrivateKey.Type DSA

EC

public static final PrivateKey.Type EC

RSA

public static final PrivateKey.Type RSA

Method Detail

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.

getStrength

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

getType

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

getUniqueID

public byte[] getUniqueID()

Deprecated: This ID is based on an implementation that might change. If this functionality is required, it should be provided in another way, such as a function that directly matches a cert and key.

Returns the unique ID of this key. Unique IDs can be used to match certificates to keys.

See Also: TokenCertificate