public class KrbSafeBody
extends java.lang.Object
implements org.apache.directory.api.asn1.Asn1Object
KRB-SAFE-BODY ::= SEQUENCE {
user-data [0] OCTET STRING,
timestamp [1] KerberosTime OPTIONAL,
usec [2] Microseconds OPTIONAL,
seq-number [3] UInt32 OPTIONAL,
s-address [4] HostAddress,
r-address [5] HostAddress OPTIONAL
}
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
IS_DEBUG
Speedup for logs
|
private int |
krbSafeBodySeqLen |
private static org.slf4j.Logger |
log
The logger
|
private HostAddress |
recipientAddress
the recipient's address
|
private int |
recipientAddressLen |
private HostAddress |
senderAddress
the sender's address
|
private int |
senderAddressLen |
private java.lang.Integer |
seqNumber
the sequence number
|
private int |
seqNumberLen |
private KerberosTime |
timestamp
the current time of the sender
|
private int |
timestampLen |
private java.lang.Integer |
usec
the microsecond part of the timestamp
|
private int |
usecLen |
private byte[] |
userData
the user data
|
private int |
userDataLen |
| Constructor and Description |
|---|
KrbSafeBody()
Creates a new instance of KrbSafeBody.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the KRB-SAFE-BODY length:
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer) |
HostAddress |
getRecipientAddress() |
HostAddress |
getSenderAddress() |
int |
getSeqNumber() |
KerberosTime |
getTimestamp() |
int |
getUsec() |
byte[] |
getUserData() |
void |
setRecipientAddress(HostAddress recipientAddress) |
void |
setSenderAddress(HostAddress senderAddress) |
void |
setSeqNumber(int seqNumber) |
void |
setTimestamp(KerberosTime timestamp) |
void |
setUsec(int usec) |
void |
setUserData(byte[] userData) |
java.lang.String |
toString() |
private static final org.slf4j.Logger log
private static final boolean IS_DEBUG
private byte[] userData
private KerberosTime timestamp
private java.lang.Integer usec
private java.lang.Integer seqNumber
private HostAddress senderAddress
private HostAddress recipientAddress
private int userDataLen
private int timestampLen
private int usecLen
private int seqNumberLen
private int senderAddressLen
private int recipientAddressLen
private int krbSafeBodySeqLen
public byte[] getUserData()
public void setUserData(byte[] userData)
userData - the userData to setpublic KerberosTime getTimestamp()
public void setTimestamp(KerberosTime timestamp)
timestamp - the timestamp to setpublic int getUsec()
public void setUsec(int usec)
usec - the usec to setpublic int getSeqNumber()
public void setSeqNumber(int seqNumber)
seqNumber - the seqNumber to setpublic HostAddress getSenderAddress()
public void setSenderAddress(HostAddress senderAddress)
senderAddress - the senderAddress to setpublic HostAddress getRecipientAddress()
public void setRecipientAddress(HostAddress recipientAddress)
recipientAddress - the recipientAddress to setpublic int computeLength()
0x30 L1 KRB-SAFE-BODY SEQ
|
+--> 0xA0 L2 user-data tag
| |
| +--> 0x04 L2-1 user-data (Octet String)
|
+--> 0xA1 0x11 timestamp tag
| |
| +--> 0x18 0x0F timestamp (KerberosTime)
|
+--> 0xA2 L3 usec tag
| |
| +--> 0x02 L3-1 usec (Microseconds)
|
+--> 0xA3 L4 seq-number tag
| |
| +--> 0x02 L4-1 seqnumber (UInt32)
|
+--> 0xA4 L5 s-address tag
| |
| +--> 0x30 L5-1 s-address (HostAddress)
|
+--> 0xA5 L6 r-address tag
|
+--> 0x30 L6-1 r-address (HostAddress)
computeLength in interface org.apache.directory.api.asn1.Asn1Objectpublic java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.api.asn1.EncoderException
encode in interface org.apache.directory.api.asn1.Asn1Objectorg.apache.directory.api.asn1.EncoderExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()