|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.mac.MACedQS
MACedQS
Pronounced: "mack'd kue ess"
This class contains two major items:
(1) A QuickSerializable
object and
(2) the MAC of (1)
MacHandler
using
MacHandler.doMAC(ostore.util.QuickSerializable, ostore.util.SecureHash)
to generate the MAC. (Internal Note:
What the MacHandler typically does is grab the getBytes()
compute the MAC and, using setMAC(byte[])
, sets the MAC.)
MacHandler.authenticate(ostore.util.QuickSerializable, ostore.util.QSByteArray, ostore.util.SecureHash)
Constructor Summary | |
MACedQS(byte[] data,
int[] offset)
The deserialization constructor. |
|
MACedQS(QuickSerializable user_data)
|
Method Summary | |
byte[] |
getBytes()
The bytes of the data MAC'd |
byte[] |
getMAC()
The MAC of the user_data |
protected void |
setMAC(byte[] MAC)
Sets the MAC value for user_data, meant for MacHandler to use. |
void |
to_bytes(byte[] data,
int[] offset)
Store the object in its "on the wire" form in the byte array data , starting at index offset [0] , and
increment offset [0] by the number of bytes written;
if data == null , increment offset [0] by
the number of bytes that would have been written otherwise. |
int |
type_code()
Returns the unique integer associated with this class in the TypeTable . |
QuickSerializable |
user_data()
The data which this object MAC'd |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MACedQS(QuickSerializable user_data)
user_data
- the message to MACpublic MACedQS(byte[] data, int[] offset) throws QSException
QuickSerializable
for details.Method Detail |
public QuickSerializable user_data()
public byte[] getBytes()
public byte[] getMAC()
protected void setMAC(byte[] MAC)
public void to_bytes(byte[] data, int[] offset)
QuickSerializable
data
, starting at index offset [0]
, and
increment offset [0]
by the number of bytes written;
if data == null
, increment offset [0]
by
the number of bytes that would have been written otherwise.to_bytes
in interface QuickSerializable
ostore.util.QuickSerializable
data
- The byte array to store into, or null
.offset
- A single element array whose first
element is the index in data to begin writing at on
function entry, and which on function exit has been
incremented by the number of bytes written.public int type_code()
QuickSerializable
TypeTable
.type_code
in interface QuickSerializable
ostore.util.QuickSerializable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |