JSS 3.1

org.mozilla.jss.pkcs11
Class PK11PrivKey

java.lang.Object
  |
  +--org.mozilla.jss.pkcs11.PK11Key
        |
        +--org.mozilla.jss.pkcs11.PK11PrivKey

final class PK11PrivKey
extends PK11Key
implements PrivateKey

See Also:
Serialized Form

Fields inherited from class org.mozilla.jss.pkcs11.PK11Key
keyProxy
 
Constructor Summary
protected PK11PrivKey(byte[] pointer)
           
 
Method Summary
 KeyType getKeyType()
           
 CryptoToken getOwningToken()
          Returns a new CryptoToken where this key resides.
 int getStrength()
          Returns the size in bits of the modulus of an RSA Private key.
 PrivateKey.Type getType()
           
 byte[] getUniqueID()
           
 void verifyKeyIsOnToken(PK11Token token)
          Make sure this key lives on the given token.
 
Methods inherited from class org.mozilla.jss.pkcs11.PK11Key
getAlgorithm, getEncoded, getFormat, readObject, writeObject
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

PK11PrivKey

protected PK11PrivKey(byte[] pointer)
Method Detail

verifyKeyIsOnToken

public void verifyKeyIsOnToken(PK11Token token)
                        throws NoSuchItemOnTokenException
Make sure this key lives on the given token.

getOwningToken

public CryptoToken getOwningToken()
Returns a new CryptoToken where this key resides.
Specified by:
getOwningToken in interface PrivateKey
Returns:
The PK11Token that owns this key.

getUniqueID

public byte[] getUniqueID()
                   throws TokenException
Specified by:
getUniqueID in interface PrivateKey

getKeyType

public KeyType getKeyType()

getType

public PrivateKey.Type getType()
Specified by:
getType in interface PrivateKey

getStrength

public int getStrength()
Returns the size in bits of the modulus of an RSA Private key. Returns -1 for other types of keys.
Specified by:
getStrength in interface PrivateKey

JSS 3.1