Oracle Security Developer Tools Security Engine Java API Reference
10g Release 2 (10.1.2.0.2)

B15569-01


oracle.security.crypto.cert
Class SPKAC

java.lang.Object
  extended byoracle.security.crypto.cert.SPKAC


public class SPKAC
extends java.lang.Object

An implementation of Signed Public Key And Challenge (SPKAC), which is used by Netscape Navigator browser to request certificates.

The SPKAC class can be used by the X509 class to generate X509 certificates.


Constructor Summary
SPKAC()
SPKAC(KeyPair kp)
Creates a new SPKAC.
SPKAC(KeyPair kp, RandomBitsSource rbs)
Creates a new SPKAC.
SPKAC(java.lang.String challenge, KeyPair kp, RandomBitsSource rbs)

Method Summary
java.lang.String getChallenge()
Returns the challenge string.
PublicKey getPublicKey()
Get the public key.
void input(java.io.InputStream is)
Inputs this SPKAC from a stream in binary DER-encoded form.
void input(java.lang.String data)
Input from a base64-encoded string.
int length()
Returns length.
void output(java.io.OutputStream os)
Output to the specified output stream.
java.lang.String toBase64()
Converts this SPKAC into a base64-encoded string.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SPKAC

public SPKAC()

SPKAC

public SPKAC(KeyPair kp)
Creates a new SPKAC. Sets the challenge to an empty string.

SPKAC

public SPKAC(KeyPair kp,
             RandomBitsSource rbs)
Creates a new SPKAC. Sets the challenge to an empty string.
Parameters:
kp - the key pair
rbs - the random bits source to be used for the signing operation, if needed

SPKAC

public SPKAC(java.lang.String challenge,
             KeyPair kp,
             RandomBitsSource rbs)

Method Detail

getPublicKey

public PublicKey getPublicKey()
Get the public key.

getChallenge

public java.lang.String getChallenge()
Returns the challenge string.

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Output to the specified output stream.
Throws:
java.io.IOException

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Inputs this SPKAC from a stream in binary DER-encoded form.
Throws:
java.io.IOException - if there was an I/O error, or the SPKAC is invalid (e.g., the signature is incorrect, or the challenge does not equal the expected value).

input

public void input(java.lang.String data)
           throws java.io.IOException
Input from a base64-encoded string.
Throws:
java.io.IOException

length

public int length()
Returns length.

toBase64

public java.lang.String toBase64()
                          throws java.io.IOException
Converts this SPKAC into a base64-encoded string.
Throws:
java.io.IOException

Oracle Security Developer Tools Security Engine Java API Reference
10g Release 2 (10.1.2.0.2)

B15569-01


Copyright © 2005 , Oracle. All rights reserved.