Top Description Inners Fields Constructors Methods
sun.security.pkcs11

pack-priv abstract Class P11Key

Additional top-level classes in compilation unit: NativeKeyHolder, SessionKeyRef.

extends Object
implements Key, Length
Class Inheritance
All Implemented Interfaces
sun.security.util.Length, java.security.Key, java.io.Serializable
Known Direct Subclasses
sun.security.pkcs11.P11Key.P11PrivateKey, sun.security.pkcs11.P11Key.P11SecretKey, sun.security.pkcs11.P11Key.P11PublicKey
Imports
java.io.*, java.lang.ref.*, java.math.BigInteger, java.util.*, java.security.*, java.security.interfaces.*, java.security.spec.*, javax.crypto.*, javax.crypto.interfaces.*, javax.crypto.spec.*, sun.security.rsa.RSAUtil.KeyType, .RSAPublicKeyImpl, .RSAPrivateCrtKeyImpl, sun.security.internal.interfaces.TlsMasterSecret, sun.security.pkcs11.wrapper.*, sun.security.util.DerValue, .Length, .ECUtil, sun.security.jca.JCAUtil

Key implementation classes. In PKCS#11, the components of private and secret keys may or may not be accessible. If they are, we use the algorithm specific key classes (e.g. DSAPrivateKey) for compatibility with existing applications. If the components are not accessible, we use a generic class that only implements PrivateKey (or SecretKey). Whether the components of a key are extractable is automatically determined when the key object is created.
Author
Andreas Sterbenz
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static class
private static class
private static class
pack-priv static class
private static class
private static class
pack-priv static class
private static class
pack-priv static class
private abstract static class
private abstract static class
private static class
pack-priv static class
private static class
private static class
private static class
private static class
P11Key.P11TlsMasterSecretKey

References Deprecated TlsMasterSecret is deprecated or references (maybe indirectly) at least one deprecated element.

Field Summary

Modifier and TypeField and Description
private static final CK_ATTRIBUTE[]
pack-priv final String
private static final boolean
pack-priv final boolean
pack-priv final transient boolean
private final NativeKeyHolder
pack-priv final int
private static final String
private static final String
private static final String
pack-priv final boolean
private static final long
pack-priv final Token
pack-priv final boolean
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
P11Key(String type, Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs)

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

pack-priv CK_ATTRIBUTE[]
pack-priv BigInteger[]
public final String
getAlgorithm()

Implements java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key.

private static CK_ATTRIBUTE[]
getAttributes(Session session, long keyID, CK_ATTRIBUTE[] knownAttributes, CK_ATTRIBUTE[] desiredAttributes)

public final byte[]
getEncoded()

Implements java.security.Key.getEncoded.

Returns the key in its primary encoding format, or null if this key does not support encoding.

pack-priv abstract byte[]
public long
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

pack-priv boolean
pack-priv boolean
pack-priv boolean
public int
length()

Implements sun.security.util.Length.length.

Return bit length of the key.

pack-priv static SecretKey
masterSecretKey(Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs, int major, int minor)

pack-priv static SecretKey
pbeKey(Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs, char[] password, byte[] salt, int iterationCount)

pack-priv static PrivateKey
privateKey(Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs)

pack-priv static PublicKey
publicKey(Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs)

public void
pack-priv static SecretKey
secretKey(Session session, long keyID, String algorithm, int keyLength, CK_ATTRIBUTE[] attrs)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected Object
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait