public class SessionKey extends SimpleDataStructure
Modifier and Type | Field and Description |
---|---|
static SessionKey |
INVALID_KEY
A key with all zeroes in the data
|
static int |
KEYSIZE_BYTES |
_data
Constructor and Description |
---|
SessionKey() |
SessionKey(byte[] data) |
Modifier and Type | Method and Description |
---|---|
Object |
getPreparedKey()
retrieve an internal representation of the session key, as known
by the AES engine used.
|
int |
length()
The legal length of the byte array in this data structure
|
void |
setData(byte[] data)
caveat: this method isn't synchronized with the preparedKey, so don't
try to *change* the key data after already doing some
encryption/decryption (or if you do change it, be sure this object isn't
mid decrypt)
|
void |
setPreparedKey(Object obj) |
calculateHash, equals, fromBase64, fromByteArray, getData, hashCode, readBytes, toBase64, toByteArray, toString, writeBytes
read
public static final int KEYSIZE_BYTES
public static final SessionKey INVALID_KEY
public int length()
SimpleDataStructure
length
in class SimpleDataStructure
public void setData(byte[] data)
setData
in class SimpleDataStructure
data
- of correct length, or nullpublic Object getPreparedKey()
public void setPreparedKey(Object obj)