|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface has to be implemented by the security helper class. An implementation of this class also has to provide a constructor that takes a java.util.Properties argument and throws the at.ac.tuwien.infosys.rnue.helpers.ShareMeException exception in case of an error.
Method Summary | |
java.security.PublicKey |
getPublicKeyFromCA(java.lang.String owner)
Retrieves the public key belonging to owner from the certification authority; returns the public key of the owner. |
boolean |
registerPublicKey(java.lang.String owner,
java.security.PublicKey pk)
Registers a public key at the certification authority. |
byte[] |
sign(java.io.Serializable obj)
Signs an object. |
boolean |
verify(java.io.Serializable obj,
byte[] sig,
java.security.PublicKey pk)
Verifies the signature of an object. |
Method Detail |
public java.security.PublicKey getPublicKeyFromCA(java.lang.String owner) throws ShareMeException
owner
- the owner of the public key
ShareMeException
- If it could not contact the
certification authority, if the key for the specified owner
could not be retrieved, or if the retrieved key cannot be
converted into a public key.public boolean registerPublicKey(java.lang.String owner, java.security.PublicKey pk) throws ShareMeException
owner
- the owner of the public keypk
- the public key
true
if the registration was successful
ShareMeException
- If an error occurspublic boolean verify(java.io.Serializable obj, byte[] sig, java.security.PublicKey pk) throws ShareMeException
obj
- the object whose signature has to be verifiedsig
- the signature of the object to be verifiedpk
- the public key of the user who signed the object
true
if the signature is valid.
ShareMeException
- If it could not contact the
certification authority or could not retrieve the public key.public byte[] sign(java.io.Serializable obj) throws ShareMeException
obj
- the object to be signed
ShareMeException
- If an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |