Package com.netscape.certsrv.key
Class KeyData
- java.lang.Object
-
- com.netscape.certsrv.key.KeyData
-
public class KeyData extends java.lang.Object- Author:
- alee
-
-
Constructor Summary
Constructors Constructor Description KeyData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static KeyDatafromJSON(java.lang.String json)static KeyDatafromXML(java.lang.String xml)java.lang.StringgetAdditionalWrappedPrivateData()java.lang.StringgetAlgorithm()java.lang.StringgetEncryptAlgorithmOID()Symmetric and Asymmetric keys will be returned either encrypted or wrapped by the client provided symmetric key.java.lang.StringgetNonceData()java.lang.StringgetP12Data()java.lang.StringgetPublicKey()RequestIdgetRequestID()ID for the recovery requestjava.lang.IntegergetSize()java.lang.StringgetType()java.lang.StringgetWrapAlgorithm()java.lang.StringgetWrappedPrivateData()inthashCode()static voidmain(java.lang.String[] args)voidsetAdditionalWrappedPrivateData(java.lang.String additionalWrappedPrivateData)voidsetAlgorithm(java.lang.String algorithm)voidsetEncryptAlgorithmOID(java.lang.String encryptAlgorithmOID)voidsetNonceData(java.lang.String nonceData)voidsetP12Data(java.lang.String p12Data)voidsetPublicKey(java.lang.String publicKey)voidsetRequestID(RequestId requestID)Set request IDvoidsetSize(java.lang.Integer size)voidsetType(java.lang.String type)voidsetWrapAlgorithm(java.lang.String wrapAlgorithm)voidsetWrappedPrivateData(java.lang.String wrappedPrivateData)java.lang.StringtoJSON()java.lang.StringtoString()java.lang.StringtoXML()
-
-
-
Method Detail
-
getWrappedPrivateData
public java.lang.String getWrappedPrivateData()
- Returns:
- the wrappedPrivateData
-
setWrappedPrivateData
public void setWrappedPrivateData(java.lang.String wrappedPrivateData)
- Parameters:
wrappedPrivateData- the wrappedPrivateData to set
-
getAdditionalWrappedPrivateData
public java.lang.String getAdditionalWrappedPrivateData()
-
setAdditionalWrappedPrivateData
public void setAdditionalWrappedPrivateData(java.lang.String additionalWrappedPrivateData)
-
getNonceData
public java.lang.String getNonceData()
- Returns:
- the nonceData
-
setNonceData
public void setNonceData(java.lang.String nonceData)
- Parameters:
nonceData- the nonceData to set
-
getP12Data
public java.lang.String getP12Data()
- Returns:
- the p12Data
-
setP12Data
public void setP12Data(java.lang.String p12Data)
- Parameters:
p12Data- the p12Data to set
-
getAlgorithm
public java.lang.String getAlgorithm()
- Returns:
- the algorithm
-
setAlgorithm
public void setAlgorithm(java.lang.String algorithm)
- Parameters:
algorithm- the algorithm to set
-
getSize
public java.lang.Integer getSize()
- Returns:
- the size
-
setSize
public void setSize(java.lang.Integer size)
- Parameters:
size- the size to set
-
getRequestID
public RequestId getRequestID()
ID for the recovery request- Returns:
- recovery request id
-
setRequestID
public void setRequestID(RequestId requestID)
Set request ID- Parameters:
requestID-
-
getEncryptAlgorithmOID
public java.lang.String getEncryptAlgorithmOID()
Symmetric and Asymmetric keys will be returned either encrypted or wrapped by the client provided symmetric key. Which mechanism is used depends on the capabilities of the server (and the HSM behind it). One (and only one) of encryptionAlgorithm or wrapAlgorithm will be set.- Returns:
- OID of encryption algorithm used to wrap the secret.
-
setEncryptAlgorithmOID
public void setEncryptAlgorithmOID(java.lang.String encryptAlgorithmOID)
-
getWrapAlgorithm
public java.lang.String getWrapAlgorithm()
- Returns:
- name (as known by JSS) of algorithm used to wrap secret if key wrapping is used
-
setWrapAlgorithm
public void setWrapAlgorithm(java.lang.String wrapAlgorithm)
-
getType
public java.lang.String getType()
-
setType
public void setType(java.lang.String type)
-
getPublicKey
public java.lang.String getPublicKey()
-
setPublicKey
public void setPublicKey(java.lang.String publicKey)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toXML
public java.lang.String toXML() throws java.lang.Exception- Throws:
java.lang.Exception
-
fromXML
public static KeyData fromXML(java.lang.String xml) throws java.lang.Exception
- Throws:
java.lang.Exception
-
toJSON
public java.lang.String toJSON() throws java.lang.Exception- Throws:
java.lang.Exception
-
fromJSON
public static KeyData fromJSON(java.lang.String json) throws java.lang.Exception
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
-