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