com.oopreserch.mercury.protector
Interface ProtectorInterface
- All Known Implementing Classes:
- Protector
- public interface ProtectorInterface
- extends java.rmi.Remote
Based on the KeyPairBox instance, provide the service
for signing and encrypting the object and vice versa.
This class depends on
Mercury API.
The private key and public key to be used for the service
must reside in the KeyPairBox instance, which is specified
at the constructor.
The object to be signed and encrypted must implement
Serializable, Signed and Sealed.
- Author:
- Jun Inamori
- See Also:
- Mercury API Documentation,
com.oopreserch.mercury.target.Signed,
com.oopreserch.mercury.target.Sealed,
KeyPairBox
|
Method Summary |
java.io.Serializable |
decryptAndVerify(java.io.Serializable obj)
Decrypt and verify the Signed and Sealed instance
and return it. |
java.io.Serializable |
signAndEncrypt(java.io.Serializable obj,
java.lang.String alias)
Sign and encrypt the Signed and Sealed instance
and return it. |
signAndEncrypt
public java.io.Serializable signAndEncrypt(java.io.Serializable obj,
java.lang.String alias)
throws java.rmi.RemoteException,
com.oopreserch.mercury.target.SafeTargetException,
com.oopreserch.util.NestedException
- Sign and encrypt the Signed and Sealed instance
and return it.
The argument of this method is marked Serializable, but
it also must implement both Signed and Sealed. The private
key used to sign and encrypt it must resides in the
KeyPairBox instance.
- Parameters:
obj - The object to be signd and encrypted. It must
implement Serializable,Signed and Sealed.alias - The name of the private key to be used for
signing and encrypting.- Returns:
- Serializable
- Throws:
- java.rmi.RemoteException -
- com.oopreserch.mercury.target.SafeTargetException -
- com.oopreserch.util.NestedException -
- See Also:
com.oopreserch.mercury.target.Signed,
com.oopreserch.mercury.target.Sealed,
KeyPairBox
decryptAndVerify
public java.io.Serializable decryptAndVerify(java.io.Serializable obj)
throws java.rmi.RemoteException,
com.oopreserch.mercury.target.SafeTargetException,
com.oopreserch.util.NestedException
- Decrypt and verify the Signed and Sealed instance
and return it.
The argument of this method is marked Serializable, but
it also must implement both Signed and Sealed. The public
key used to decrypt and verify it must resides in the
KeyPairBox instance.
- Parameters:
obj - The object to be decrypted and verified. It must
implement Serializable,Signed and Sealed.- Returns:
- Serializable
- Throws:
- java.rmi.RemoteException -
- com.oopreserch.mercury.target.SafeTargetException -
- com.oopreserch.util.NestedException -
- See Also:
com.oopreserch.mercury.target.Signed,
com.oopreserch.mercury.target.Sealed,
KeyPairBox
ALL CONTENTS COPYRIGHT 2000, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.