|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.xml.KeyInfo | +--com.rsa.certj.xml.KeyValue
This class builds and stores a KeyValue
element in
KeyInfo
. It contains the key that can be used to validate
the signature.
See Also
Fields inherited from class com.rsa.certj.xml.KeyInfo |
KEYNAME_KEYINFO, KEYVALUE_KEYINFO, MGMTDATA_KEYINFO, MGMTDATA_TYPE, PGPDATA_KEYINFO, PGPDATA_TYPE, RETRIEVALMETHOD_KEYINFO, SPKIDATA_KEYINFO, SPKIDATA_TYPE, X509CERTIFICATE_TYPE, X509DATA_KEYINFO, X509DATA_TYPE |
Constructor Summary |
|
KeyValue()
Creates an empty |
|
KeyValue(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Creates a |
Method Summary |
|
clone()
Overrides the default |
|
org.w3c.dom.Element |
generateKeyInfo(org.w3c.dom.Document document,
String xmlNamespace,
String prefix)
Creates a DOM |
getCertificates(CertJ certj)
Returns the certificates stored in this |
|
com.rsa.jsafe.JSAFE_PublicKey |
getKey()
Returns the public key. |
getKeyInfoName()
Returns the keyInfo name as a |
|
int |
getKeyInfoType()
Returns an integer specifying the keyInfo type. |
boolean |
hasCertificate()
Returns a |
boolean |
hasKey()
Returns a |
void |
parseKeyInfo(org.w3c.dom.Element keyInfoNode,
String xmlNamespace)
Parses the keyInfo element and sets the key with the retrieved data. |
void |
setCertificates(Certificate[] certificates)
Sets the certificates of this |
void |
setKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Sets the public-key values of this |
Methods inherited from class com.rsa.certj.xml.KeyInfo |
getInstance |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyValue()
KeyValue
object.public KeyValue(com.rsa.jsafe.JSAFE_PublicKey publicKey)
KeyValue
object and initializes the key
to publicKey.
Parameters
publicKey | A |
Method Detail |
public int getKeyInfoType()
KeyValue
object, it is always KEYVALUE_KEYINFO
.
Overrides
getKeyInfoType
in class KeyInfo
Returns
public String getKeyInfoName()
String
.
Overrides
getKeyInfoName
in class KeyInfo
Returns
KeyValue
object as a
String
value.public org.w3c.dom.Element generateKeyInfo(org.w3c.dom.Document document, String xmlNamespace, String prefix) throws XMLException
Element
object using the contents of the
KeyInfo
object. This element will be attached to the
document.
Overrides
generateKeyInfo
in class KeyInfo
Parameters
document | A DOM | ||
xmlNamespace | A | ||
prefix | A |
Returns
Element
object that stores the Base64-encoded
data of the public key stored in this KeyInfo
object.Throws
XMLException
- If an error occurs in generating the
KeyInfo
object as an Element
.public void parseKeyInfo(org.w3c.dom.Element keyInfoNode, String xmlNamespace) throws XMLException
Overrides
parseKeyInfo
in class KeyInfo
Parameters
keyInfoNode | A DOM | ||
xmlNamespace | A |
Throws
XMLException
- If an error occurs while processing
the keyInfo Element
object.public void setKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
KeyValue
object.
Overrides
setKey
in class KeyInfo
Parameters
publicKey | The public key used to validate the signature
as a |
public void setCertificates(Certificate[] certificates) throws XMLException
KeyInfo
object
to certificates.
Do not call this method on a KeyValue
object.Overrides
setCertificates
in class KeyInfo
Parameters
certificates | A list of |
Throws
XMLException
- Always throws an XMLException
,
since a KeyValue
does not store certificates.public com.rsa.jsafe.JSAFE_PublicKey getKey()
Overrides
getKey
in class KeyInfo
Returns
JSAFE_PublicKey
.public boolean hasCertificate()
Boolean
variable indicating
whether this KeyValue
contains certificates.
Overrides
hasCertificate
in class KeyInfo
Returns
true
if this KeyInfo
object
contains certificates; false
otherwise.
A KeyValue
does not store
certificates, so this method always returns false
.public boolean hasKey()
Boolean
variable indicating
whether this KeyValue
contains a public key.
Overrides
hasKey
in class KeyInfo
Returns
KeyValue
object, this method always returns
true
.public Certificate[] getCertificates(CertJ certj)
KeyInfo
.
Overrides
getCertificates
in class KeyInfo
Parameters
certj | A |
Returns
KeyValue
object,
this method always returns null
,
because KeyValue
does not store certificates.public Object clone() throws CloneNotSupportedException
clone
method to get a deeper clone.
Returns
KeyValue
object,
a copy of this object.Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |