public class KeyData
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
KeyData()
Instantiates a new key data.
|
KeyData(int flagsArg,
int protocolArg,
int algArg,
java.lang.String pubKeyArg)
Instantiates a new key data.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
appendKeyDataElement(XMLWriter xmlWriter,
org.w3c.dom.Element parentElement,
KeyData keyData)
Append key data element.
|
boolean |
equals(java.lang.Object obj) |
static KeyData |
fromXML(XMLDocument xmlDoc,
java.lang.String keyDataXPath)
From converts the XML document to a KeyData Object.
|
int |
getAlg() |
int |
getFlags() |
int |
getProtocol() |
java.lang.String |
getPubKey() |
int |
hashCode() |
void |
setAlg(int algArg)
Sets the algorithm and validates the value is an unsigned byte.
|
void |
setFlags(int flagsArg)
Sets the flags and validates the value is unsigned short.
|
void |
setProtocol(int protocolArg)
Sets the protocol and validates the value is unsigned byte.
|
void |
setPubKey(java.lang.String pubKeyArg)
Sets the pub key and validates the value is not a zero length string.
|
public KeyData()
public KeyData(int flagsArg,
int protocolArg,
int algArg,
java.lang.String pubKeyArg)
flagsArg - the flagsprotocolArg - the protocolalgArg - the algorithmpubKeyArg - the public keypublic static final KeyData fromXML(XMLDocument xmlDoc, java.lang.String keyDataXPath) throws java.lang.Exception
xmlDoc - the XML dockeyDataXPath - the key data XPATHjava.lang.Exception - the exceptionpublic static final void appendKeyDataElement(XMLWriter xmlWriter, org.w3c.dom.Element parentElement, KeyData keyData)
xmlWriter - the XML writerparentElement - the parent elementkeyData - the key datapublic int getFlags()
public void setFlags(int flagsArg)
flagsArg - the new flagsjava.lang.IllegalArgumentException - if flagsArg are outside of the range 0...65535public int getProtocol()
public void setProtocol(int protocolArg)
protocolArg - the new protocoljava.lang.IllegalArgumentException - if protocolArg is outside of the range 0...255public int getAlg()
public void setAlg(int algArg)
algArg - the new algorithmjava.lang.IllegalArgumentException - if algArg is outside of the range 0...255public java.lang.String getPubKey()
public void setPubKey(java.lang.String pubKeyArg)
pubKeyArg - the new pub keyjava.lang.IllegalArgumentException - if pubKeyArg is empty.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object