|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PkgAgentSystem.Messaging.Message | +--PkgAgentSystem.Messaging.SignedMessage
A message signed by the sender.
Based on SignedObject Ver. 1.34, 10/27/98 (Author: Li Gong)
Fields inherited from class PkgAgentSystem.Messaging.Message |
addressee,
convTypeID,
destConvID,
sender,
srcConvID |
Constructor Summary | |
protected |
SignedMessage()
Create a new and empty signed message. |
|
SignedMessage(Message msg,
Certificate[] signerCerts,
PrivateKey signingKey,
Signature signingEngine)
Constructs a SignedMessage from a Message .
|
Method Summary | |
String |
getAlgorithm()
Retrieves the name of the signature algorithm used for signing. |
Certificate[] |
getCertificateChain()
Retrieves the certificate chain of the signer. |
Message |
getMessage()
Retrieves the encapsulated message. |
byte[] |
getSignature()
Rerieves the signature on the signed object, in the form of a byte array. |
String |
toString()
Retrieves a string representation of the signed message |
boolean |
verify(KeyStore ks)
Verifies that the signature in this SignedMessage is the valid signature for the message stored inside, with the given key store. |
boolean |
verify(PublicKey verificationKey)
Verifies that the signature in this SignedMessage is the valid signature for the message stored inside, with the given verification key. |
boolean |
verify(PublicKey verificationKey,
Signature verificationEngine)
Verifies that the signature in this SignedMessage is the valid signature for the message stored inside, with the given verification key, using the designated verification engine. |
Methods inherited from class PkgAgentSystem.Messaging.Message |
copy,
getAddressee,
getConversationTypeID,
getDestConversationID,
getSender,
getSrcConversationID,
setDestConversationID,
setSrcConversationID |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected SignedMessage()
public SignedMessage(Message msg, Certificate[] signerCerts, PrivateKey signingKey, Signature signingEngine) throws IOException, InvalidKeyException, SignatureException
SignedMessage
from a Message
.
The given message is signed with the given signing key, using the
designated signature engine. The message is stored for future access,
but later changes will not be reflected, as it is stored in binary form
and signed now.msg
- the message to be signed.signerCerts
- the certificate chain of the signersigningKey
- the private key for signing.signingEngine
- the signature signing engine.Method Detail |
public Message getMessage()
public Certificate[] getCertificateChain()
public byte[] getSignature()
public String getAlgorithm()
public String toString()
public boolean verify(PublicKey verificationKey) throws InvalidKeyException, SignatureException, NoSuchAlgorithmException
verificationKey
- the public key for verificationpublic boolean verify(PublicKey verificationKey, Signature verificationEngine) throws InvalidKeyException, SignatureException
verificationKey
- the public key for verificationverificationEngine
- the signature verification enginepublic boolean verify(KeyStore ks) throws InvalidKeyException, SignatureException, NoSuchAlgorithmException
ks
- the key store used for verification
|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |