ajanta.agent
Class TargetedState
java.lang.Object
|
+--ajanta.agent.TargetedState
- public class TargetedState
- extends java.lang.Object
In some applications, an agent programmer needs to protect items in the
agent's state such that they are only accessible to certain servers .
Items are targeted towards particular servers, and need to be
selectively revealed to those servers alone. To facilitate this, we
provide a TargetedState object in Ajanta's generic agent.
- See Also:
ReadOnlyContainer
,
AppendOnlyContainer
Field Summary |
java.util.Vector |
objs
|
java.util.Vector |
servers
|
Constructor Summary |
TargetedState(java.util.Vector objs,
java.util.Vector servers,
java.security.interfaces.DSAPrivateKey key)
|
Method Summary |
boolean |
verify(java.security.interfaces.DSAPublicKey key)
It is called to ensure that the encrypted objects and their
intended targets have not been tampered with. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
objs
public java.util.Vector objs
servers
public java.util.Vector servers
TargetedState
public TargetedState(java.util.Vector objs,
java.util.Vector servers,
java.security.interfaces.DSAPrivateKey key)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.io.IOException
- Parameters:
objs
- vector of objects encrypted using the public key of the server for which it is
targeted.servers
- vector of server identities corresponding to each entry in objskey
- owner's DSA private key
verify
public boolean verify(java.security.interfaces.DSAPublicKey key)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.io.IOException
- It is called to ensure that the encrypted objects and their
intended targets have not been tampered with.
- Parameters:
key
- agent's public key
- Returns:
- true if the not tempered, false otherwise.
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.io.IOException