|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.deas.hyperenc.HyperMessage
public class HyperMessage
A HyperMessage is a hyper-encrypted message sent from one HyperEncryption client to another. It encompasses reconciliation and other protocol messages, as well as actual encrypted messages containing user-specified content.
A HyperMessage has several abstract fields:
HyperMAC
object representing the HEMAC of
this message
Method Summary | |
---|---|
boolean |
equals(Object o)
Compares this HyperMessage to the specified object. |
String |
getContent()
Returns the content of this message. |
Date |
getDate()
Returns the date of this message. |
int |
getID()
Returns the unique ID of this message. |
static HyperMessage |
getInstance(HyperMessageType type,
Contact sender,
Contact recipient,
String subject,
String content,
List<Integer> padsUsed,
HyperMAC hemac,
Date date)
Creates and returns a new HyperMessage. |
HyperMAC |
getMac()
Returns the HEMAC for this message. |
protected static int |
getNextID()
Returns the ID that should be assigned to the next new HyperMessage created. |
List<Integer> |
getPadsUsed()
Returns a list of IDs of blocks used to encrypt this message. |
Contact |
getRecipient()
Returns the recipient of this message. |
Contact |
getSender()
Returns the sender of this message. |
String |
getSubject()
Returns the subject of this message. |
HyperMessageType |
getType()
Returns the type of this message. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected static final int getNextID()
public static HyperMessage getInstance(HyperMessageType type, Contact sender, Contact recipient, String subject, String content, List<Integer> padsUsed, HyperMAC hemac, Date date)
null
are padsUsed
and hemac
. A
null
value for padsUsed
indicates that the
message content is not encrypted. A null
value for
hemac
indicates that no authentication information is
included.
padsUsed
is copied before it is stored in this HyperMessage.
type
- The type of this message.sender
- The sender of this message.recipient
- The recipient of this message.subject
- The subject of this message.content
- The content of this message.padsUsed
- An ordered list of the IDs of the one-time pad blocks that were used
to encrypt this message.date
- The date of this message.
NullPointerException
- if any argument other than padsUsed
is
null
public int getID()
public HyperMessageType getType()
public Contact getSender()
public Contact getRecipient()
public String getSubject()
public String getContent()
public List<Integer> getPadsUsed()
public HyperMAC getMac()
public Date getDate()
public boolean equals(Object o)
true
if and only if the argument is not null
and
is a HyperMessage object with the same ID as this HyperMessage.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |