public class KeyGenInfo
extends java.lang.Object
KeyGenInfo
represents the information generated by
the KeyGen tag of the HTML forms. It provides the parsing and accessing
mechanisms.
SignedPublicKeyAndChallenge ::= SEQUENCE { publicKeyAndChallenge PublicKeyAndChallenge, signatureAlgorithm AlgorithmIdentifier, signature BIT STRING } PublicKeyAndChallenge ::= SEQUENCE { spki SubjectPublicKeyInfo, challenge IA5STRING }
Constructor and Description |
---|
KeyGenInfo()
Construct empty KeyGenInfo.
|
KeyGenInfo(java.lang.String spkac)
Construct KeyGenInfo using the SignedPublicKeyAndChallenge
string representation.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(java.lang.String spkac)
Initialize using the SPKAC string
|
byte[] |
encode()
Der encoded into buffer
|
netscape.security.x509.AlgorithmId |
getAlgorithmId()
Get Algorithm ID
|
java.lang.String |
getChallenge()
Get Challenge phrase in string format
|
netscape.security.util.DerValue |
getDerChallenge()
Get Challenge phrase in DerValue form
|
netscape.security.util.DerValue |
getDerSPKI()
Get SPKI in DerValue form
|
byte[] |
getSignature()
Get Signature
|
netscape.security.x509.X509Key |
getSPKI()
Get SPKI as X509Key
|
java.lang.String |
toString()
String representation of KenGenInfo
|
boolean |
validateChallenge(java.lang.String challenge)
Validate Signature and Challenge Phrase
|
public KeyGenInfo()
public KeyGenInfo(java.lang.String spkac) throws java.io.IOException
spkac
- SignedPublicKeyAndChallenge string representationjava.io.IOException
public void decode(java.lang.String spkac) throws java.io.IOException
spkac
- SPKAC string from the end userjava.io.IOException
public byte[] encode()
public netscape.security.util.DerValue getDerSPKI()
public netscape.security.x509.X509Key getSPKI()
public netscape.security.util.DerValue getDerChallenge()
public java.lang.String getChallenge()
public byte[] getSignature()
public netscape.security.x509.AlgorithmId getAlgorithmId()
public boolean validateChallenge(java.lang.String challenge)
challenge
- phrase; null if nonepublic java.lang.String toString()
toString
in class java.lang.Object