Class semper.certificate.Registration
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.certificate.Registration

java.lang.Object
   |
   +----semper.certificate.Registration

public class Registration
extends Object
implements Streamable, CertificateConstants

Constructor Index

 o Registration()
Create an empty Registration
 o Registration(String, String, CryptoKeyInfo, String, String, String, String, String, String, String, String, CryptoKeyInfo, long, byte[])
Create a registration.

Method Index

 o checkSign(CryptoKeyInfo, int)
Check whether this Registration is signed properly.
 o getCityName()
retrieve name of city user lives in
 o getCountry()
retrieve nam of country user lives in
 o getDN()
retrieve users distinguished name as registrated at CA
 o getEmailAddr()
retrieve users email addres
 o getID()
retrieve users id-number (Passport-no, CPR-nr,etc)
 o getPhoneNo()
retrieve users phone no
 o getPK()
retrieve users postal code
 o getPublicKey()
retrieve Public Key wanted to be registrated with
 o getRADN()
retrieve Registration authorities distinguished name
 o getRAPkey()
retrieve RA's public key
 o getRASignature()
retrieve RA's signature for this registration
 o getSerialNo()
retrieve the serial no.
 o getStreetName()
retrieve Street name and house number
 o getUserName()
retrieve users name
 o myStreamSize()
Finds the expected number of bytes needed to externalize the object to s.
 o readObject(StreamInputInterface)
Reads the object from an io stream (TargetStream).
 o sign(CryptoKeyInfo, int)
Sign this Registration with skey, which is RA's secret key used as a counterpart to the RA's public key as stored in the registration.
 o writeObject(StreamOutputInterface)
Writes the object to an io stream (TargetStream).

Constructors

 o Registration
  public Registration(String name,
                      String DN,
                      CryptoKeyInfo pubKey,
                      String street,
                      String city,
                      String pk,
                      String country,
                      String email,
                      String phone,
                      String idCard,
                      String raName,
                      CryptoKeyInfo raPKey,
                      long serialNo,
                      byte raSignature[])
Create a registration.
Parameters:
name - = Name of the user who wants to registration
dn - = Distinguished Name of the user in relation to CA.
pk - = Users Postal Code.
street - = Street user lives in (together with street no)
city - = City user lives in.
country - = country user lives in.
email - = users email-address
phone - = Users phone number
idCardNr - = Number of ID card (passport, CPRnr or something equivalent)
 o Registration
  public Registration()
Create an empty Registration

Methods

 o getUserName
  public String getUserName()
retrieve users name
 o getDN
  public String getDN()
retrieve users distinguished name as registrated at CA
 o getPublicKey
  public CryptoKeyInfo getPublicKey()
retrieve Public Key wanted to be registrated with
 o getStreetName
  public String getStreetName()
retrieve Street name and house number
 o getCityName
  public String getCityName()
retrieve name of city user lives in
 o getPK
  public String getPK()
retrieve users postal code
 o getCountry
  public String getCountry()
retrieve nam of country user lives in
 o getPhoneNo
  public String getPhoneNo()
retrieve users phone no
 o getID
  public String getID()
retrieve users id-number (Passport-no, CPR-nr,etc)
 o getEmailAddr
  public String getEmailAddr()
retrieve users email addres
 o getRADN
  public String getRADN()
retrieve Registration authorities distinguished name
 o getRASignature
  public byte[] getRASignature()
retrieve RA's signature for this registration
 o getRAPkey
  public CryptoKeyInfo getRAPkey()
retrieve RA's public key
 o getSerialNo
  public long getSerialNo()
retrieve the serial no. with which this registration is identified at the RA _raName.
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Writes the object to an io stream (TargetStream).
Parameters:
s - is the stream the object is written to
Returns:
void
Throws: StreamIOException
if write failed.
See Also:
readObject
 o sign
  public void sign(CryptoKeyInfo skey,
                   int hashAlg) throws CertificateManException
Sign this Registration with skey, which is RA's secret key used as a counterpart to the RA's public key as stored in the registration.
Parameters:
skey: - RA's secret key
hashAlg: - the ID of the Algorithm used for hashing.
Throws: CertificateManException
if signature couldn't be generated by CryptoMan.
 o checkSign
  public boolean checkSign(CryptoKeyInfo pkey,
                           int hashAlg) throws CertificateManException
Check whether this Registration is signed properly.
Parameters:
pkey: - if pkey!=null, it is used instead of the public key stored in the registration. Otherwise this.getPublicKey() is used to check the registration.
hashAlg: - the ID of the Algorithm used for hashing.
Returns:
s boolean telling whether signature is ok or not.
Throws: CertificateManException
if check couldn't be done.
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Reads the object from an io stream (TargetStream).
Parameters:
s - is the stream the object is read from
Returns:
void
Throws: StreamIOException
if object couldn't get read from s.
See Also:
writeObject
 o myStreamSize
  public int myStreamSize() throws StreamIOException
Finds the expected number of bytes needed to externalize the object to s.
Parameters:
s - is the stream the key information is written to
Returns:
number of bytes required
Throws: StreamIOException
if size couldn't be calculated.
See Also:
writeObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index