| java.lang.Object com.sun.midp.publickeystore.PublicKeyInfo
PublicKeyInfo | public class PublicKeyInfo (Code) | | The information that needs to be stored for a public key.
|
Field Summary | |
final public static byte | DOMAIN_TAG Used to get the domain field in a serialized key. | final public static byte | ENABLED_TAG Used to get the enable field in a serialized key. | final public static byte | EXPONENT_TAG Used to tag the exponent field in a serialized key. | final public static byte | MODULUS_TAG Used to tag the modulus field in a serialized key. | final public static byte | NOT_AFTER_TAG Used to tag the notAfter field in a serialized key. | final public static byte | NOT_BEFORE_TAG Used to tag the notBefore field in a serialized key. | final public static byte | OWNER_TAG Used to tag the owner field in a serialized key. | boolean | enabled If this key can be used for authorization. |
Constructor Summary | |
public | PublicKeyInfo(String owner, long notBefore, long notAfter, byte[] modulus, byte[] exponent, String domain, boolean enabled) Constructs a PublicKeyInfo object with the specified attributes. | public | PublicKeyInfo(String owner, long notBefore, long notAfter, byte[] modulus, byte[] exponent, String domain) Constructs a PublicKeyInfo object with the specified attributes. |
Method Summary | |
public String | getDomain() Gets name of the security domain for this key. | public byte[] | getExponent() Gets RSA exponent of the public key. | static PublicKeyInfo | getKeyFromStorage(InputStorage storage) Deserializes a public key from storage. | public byte[] | getModulus() Gets RSA modulus of the public key. | public long | getNotAfter() Gets the end of the key's validity period in
milliseconds since Jan 1, 1970. | public long | getNotBefore() Gets the start of the key's validity period in
milliseconds since Jan 1, 1970. | public String | getOwner() Gets the distinguished name of the key's owner. | public boolean | isEnabled() Gets the enabled status of this key. | public void | setDomain(String domain) Sets the name of the security domain for this key if it does not have
a domain. |
DOMAIN_TAG | final public static byte DOMAIN_TAG(Code) | | Used to get the domain field in a serialized key.
|
ENABLED_TAG | final public static byte ENABLED_TAG(Code) | | Used to get the enable field in a serialized key.
|
EXPONENT_TAG | final public static byte EXPONENT_TAG(Code) | | Used to tag the exponent field in a serialized key.
|
MODULUS_TAG | final public static byte MODULUS_TAG(Code) | | Used to tag the modulus field in a serialized key.
|
NOT_AFTER_TAG | final public static byte NOT_AFTER_TAG(Code) | | Used to tag the notAfter field in a serialized key.
|
NOT_BEFORE_TAG | final public static byte NOT_BEFORE_TAG(Code) | | Used to tag the notBefore field in a serialized key.
|
OWNER_TAG | final public static byte OWNER_TAG(Code) | | Used to tag the owner field in a serialized key.
|
enabled | boolean enabled(Code) | | If this key can be used for authorization.
|
PublicKeyInfo | public PublicKeyInfo(String owner, long notBefore, long notAfter, byte[] modulus, byte[] exponent, String domain, boolean enabled)(Code) | | Constructs a PublicKeyInfo object with the specified attributes.
This constructor is only used by PublicKeyInfo and its subclasses.
Parameters: owner - distinguished name of the owner Parameters: notBefore - start of validity period expressed in millisecondssince midnight Jan 1, 1970 UTC Parameters: notAfter - end of validity period expressed as above Parameters: modulus - modulus associated with the RSA Public Key Parameters: exponent - exponent associated with the RSA Public Key Parameters: domain - security domain of any application authorizedwith the corresponding private key, this can beset to null, allowing it to be set later Parameters: enabled - if true this key is enable, if false the user hasdisabled this key for authorization |
PublicKeyInfo | public PublicKeyInfo(String owner, long notBefore, long notAfter, byte[] modulus, byte[] exponent, String domain)(Code) | | Constructs a PublicKeyInfo object with the specified attributes.
This constructor is only used by PublicKeyInfo and its subclasses.
Defaults enabled to true.
Parameters: owner - distinguished name of the owner Parameters: notBefore - start of validity period expressed in millisecondssince midnight Jan 1, 1970 UTC Parameters: notAfter - end of validity period expressed as above Parameters: modulus - modulus associated with the RSA Public Key Parameters: exponent - exponent associated with the RSA Public Key Parameters: domain - security domain of any application authorizedwith the corresponding private key, this can beset to null, allowing it to be set later |
getExponent | public byte[] getExponent()(Code) | | Gets RSA exponent of the public key.
the exponent |
getKeyFromStorage | static PublicKeyInfo getKeyFromStorage(InputStorage storage) throws IOException(Code) | | Deserializes a public key from storage.
Parameters: storage - what to get the key from a full populated PublicKeyInfo object exception: IOException - if the key storage was corrupted |
getModulus | public byte[] getModulus()(Code) | | Gets RSA modulus of the public key.
the modulus |
getNotAfter | public long getNotAfter()(Code) | | Gets the end of the key's validity period in
milliseconds since Jan 1, 1970.
end of a key's validity period. |
getNotBefore | public long getNotBefore()(Code) | | Gets the start of the key's validity period in
milliseconds since Jan 1, 1970.
start of a key's validity period. |
getOwner | public String getOwner()(Code) | | Gets the distinguished name of the key's owner.
name of key's owner |
isEnabled | public boolean isEnabled()(Code) | | Gets the enabled status of this key.
true if this key is enabled |
setDomain | public void setDomain(String domain)(Code) | | Sets the name of the security domain for this key if it does not have
a domain.
Parameters: domain - security domain See Also: PublicKeyInfo.getDomain |
|
|