|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--br.shob.TimeStamp
TimeStamp is a wraper for a java.util.Date object.
It is responsible for signatura validation, ensuring that this date was
generated by the serever.
Only the server should create TimeStamps
.
Constructor Summary | |
TimeStamp(Date d,
PrivateKey key)
Main contructor for the class. |
Method Summary | |
boolean |
before(TimeStamp other)
Description of the Method |
int |
compareTo(TimeStamp other)
Description of the Method |
Date |
getDate()
accessor for the date object. |
String |
toString()
Description of the Method |
boolean |
verify(PublicKey key)
verifies the autenticity of the TimeStamp. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TimeStamp(Date d, PrivateKey key) throws InsecureObjectException
d
- the date object to be signed.key
- the private key used for signing.
InsecureObjectException
- Description of the Exception
InsecureObjectException
- if the signing process fails.Method Detail |
public boolean before(TimeStamp other) throws InsecureObjectException
other
- Description of the Parameter
InsecureObjectException
- Description of the Exceptionpublic int compareTo(TimeStamp other) throws InsecureObjectException
other
- Description of the Parameter
InsecureObjectException
- Description of the Exceptionpublic Date getDate() throws InsecureObjectException
Date
of this time stamp.
InsecureObjectException
- if the signing process fails.public String toString()
toString
in class Object
public boolean verify(PublicKey key) throws InsecureObjectException
key
- the public key used in the verification
process.
true
if the digital signature
is valid, false
otherwise.
InsecureObjectException
- if the signing process fails.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |