public class ProofOfArchival extends java.lang.Object implements IDBObj, IProofOfArchival, java.io.Serializable
Here is the ASN1 definition of a proof of escrow:
ProofOfEscrow ::= SIGNED { SEQUENCE { version [0] Version DEFAULT v1, serialNumber INTEGER, subjectName Name, issuerName Name, dateOfArchival Time, extensions [1] Extensions OPTIONAL } }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_DATE_OF_ARCHIVAL |
static java.lang.String |
ATTR_ISSUER |
static java.lang.String |
ATTR_SERIALNO |
static java.lang.String |
ATTR_SUBJECT |
static java.lang.String |
ATTR_VERSION |
static java.math.BigInteger |
DEFAULT_VERSION
Constants
|
protected java.util.Date |
mDateOfArchival |
protected java.lang.String |
mIssuer |
protected static java.util.Vector |
mNames |
protected java.math.BigInteger |
mSerialNo |
protected java.lang.String |
mSubject |
protected java.math.BigInteger |
mVersion |
Constructor and Description |
---|
ProofOfArchival(java.math.BigInteger serialNo,
java.lang.String subject,
java.lang.String issuer,
java.util.Date dateOfArchival)
Constructs a proof of escrow.
|
ProofOfArchival(java.io.InputStream in)
Constructs proof of escrow from input stream.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(java.io.InputStream in)
Decodes the input stream.
|
void |
delete(java.lang.String name)
Deletes an attribute.
|
void |
encode(netscape.security.util.DerOutputStream out)
Encodes this proof of escrow into the given
output stream.
|
void |
encodeAndSign(java.security.PrivateKey key,
java.lang.String algorithm,
java.lang.String provider,
netscape.security.util.DerOutputStream out)
Encodes and signs this proof of escrow.
|
java.lang.Object |
get(java.lang.String name)
Retrieves the value of an named attribute.
|
java.util.Date |
getDateOfArchival()
Returns the beginning of the escrowed perioid.
|
java.util.Enumeration |
getElements()
Retrieves a list of possible attribute names.
|
java.lang.String |
getIssuerName()
Retrieves the issuer name.
|
java.util.Enumeration |
getSerializableAttrNames()
Retrieves serializable attribute names.
|
java.math.BigInteger |
getSerialNumber()
Retrieves the serial number.
|
java.lang.String |
getSubjectName()
Retrieves the subject name.
|
java.math.BigInteger |
getVersion()
Retrieves version of this proof.
|
void |
set(java.lang.String name,
java.lang.Object obj)
Sets an attribute value.
|
java.lang.String |
toString()
Retrieves the string reprensetation of this
proof of archival.
|
public static final java.math.BigInteger DEFAULT_VERSION
public static final java.lang.String ATTR_VERSION
public static final java.lang.String ATTR_SERIALNO
public static final java.lang.String ATTR_SUBJECT
public static final java.lang.String ATTR_ISSUER
public static final java.lang.String ATTR_DATE_OF_ARCHIVAL
protected java.math.BigInteger mSerialNo
protected java.math.BigInteger mVersion
protected java.lang.String mSubject
protected java.lang.String mIssuer
protected java.util.Date mDateOfArchival
protected static java.util.Vector mNames
public ProofOfArchival(java.math.BigInteger serialNo, java.lang.String subject, java.lang.String issuer, java.util.Date dateOfArchival)
serialNo
- serial number of proofsubject
- subject nameissuer
- issuer namedateOfArchival
- date of archivalpublic ProofOfArchival(java.io.InputStream in) throws EBaseException
in
- encoding sourceEBaseException
- failed to decodepublic void set(java.lang.String name, java.lang.Object obj) throws EBaseException
set
in interface IAttrSet
name
- attribute nameobj
- attribute valueEBaseException
- failed to set attributepublic java.lang.Object get(java.lang.String name) throws EBaseException
get
in interface IAttrSet
name
- attribute nameEBaseException
- failed to get attributepublic void delete(java.lang.String name) throws EBaseException
delete
in interface IAttrSet
name
- attribute nameEBaseException
- failed to get attributepublic java.util.Enumeration getElements()
getElements
in interface IAttrSet
public java.util.Enumeration getSerializableAttrNames()
getSerializableAttrNames
in interface IDBObj
public java.math.BigInteger getVersion()
getVersion
in interface IProofOfArchival
public java.math.BigInteger getSerialNumber()
getSerialNumber
in interface IProofOfArchival
public java.lang.String getSubjectName()
getSubjectName
in interface IProofOfArchival
public java.lang.String getIssuerName()
getIssuerName
in interface IProofOfArchival
public java.util.Date getDateOfArchival()
getDateOfArchival
in interface IProofOfArchival
public void encode(netscape.security.util.DerOutputStream out) throws EBaseException
EBaseException
public void encodeAndSign(java.security.PrivateKey key, java.lang.String algorithm, java.lang.String provider, netscape.security.util.DerOutputStream out) throws EBaseException
EBaseException
public void decode(java.io.InputStream in) throws EBaseException
EBaseException
public java.lang.String toString()
toString
in class java.lang.Object