public class ETypeInfo2Entry
extends java.lang.Object
implements org.apache.directory.api.asn1.Asn1Object
ETYPE-INFO2-ENTRY ::= SEQUENCE {
etype [0] Int32,
salt [1] KerberosString OPTIONAL,
s2kparams [2] OCTET STRING OPTIONAL
}
| Modifier and Type | Field and Description |
|---|---|
private EncryptionType |
etype
The encryption type
|
private int |
etypeInfo2EntrySeqLength |
private int |
etypeTagLength |
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG
The logger
|
private byte[] |
s2kparams
The s2k params
|
private int |
s2kparamsTagLength |
private java.lang.String |
salt
The salt
|
private byte[] |
saltBytes |
private int |
saltTagLength |
| Constructor and Description |
|---|
ETypeInfo2Entry()
Creates a new instance of ETypeInfo2Entry.
|
ETypeInfo2Entry(EncryptionType etype) |
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the ETYPE-INFO2-ENTRY length
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the ETYPE-INFO2-ENTRY message to a PDU.
|
EncryptionType |
getEType()
Returns the
EncryptionType. |
byte[] |
getS2kparams()
Returns the s2kparams.
|
java.lang.String |
getSalt()
Returns the salt.
|
void |
setEType(EncryptionType etype) |
void |
setS2kparams(byte[] s2kparams) |
void |
setSalt(java.lang.String salt) |
java.lang.String |
toString() |
private static final org.slf4j.Logger LOG
private static final boolean IS_DEBUG
private EncryptionType etype
private java.lang.String salt
private byte[] saltBytes
private byte[] s2kparams
private int etypeTagLength
private int saltTagLength
private int s2kparamsTagLength
private int etypeInfo2EntrySeqLength
public ETypeInfo2Entry()
public ETypeInfo2Entry(EncryptionType etype)
public java.lang.String getSalt()
public void setSalt(java.lang.String salt)
salt - the salt to setpublic byte[] getS2kparams()
public void setS2kparams(byte[] s2kparams)
s2kparams - the s2kparams to setpublic EncryptionType getEType()
EncryptionType.EncryptionType.public void setEType(EncryptionType etype)
encryptionType - the encryptionType to setpublic int computeLength()
ETYPE-INFO-ENTRY :
0x30 L1 ETYPE-INFO2-ENTRY sequence
|
+--> 0xA0 L2 etype tag
| |
| +--> 0x02 L2-1etype (int)
|
+--> 0xA1 L3 salt tag
| |
| +--> 0x1B L3-1 salt (KerberosString)
|
+--> 0xA2 L4 s2kparams tag
|
+--> 0x04 L4-1 salt (OCTET STRING)
where L1 = L2 + length(0xA0) + length(L2) +
L3 + length(0xA1) + length(L3) +
L4 + length(0xA2) + length( L4)
and
L2 = L2-1 + length(0x02) + length( L2-1)
L3 = L3-1 + length(0x1B) + length( L3-1)
L4 = L4-1 + length(0x04) + length( L4-1)
computeLength in interface org.apache.directory.api.asn1.Asn1Objectpublic java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.api.asn1.EncoderException
ETYPE-INFO2-ENTRY :
0x30 LL
0xA0 LL
0x02 0x01 etype
0xA1 LL
0x1B LL salt
0xA2 LL
0x04 LL s2kparams
encode in interface org.apache.directory.api.asn1.Asn1Objectbuffer - The buffer where to put the PDU. It should have been allocated
before, with the right size.org.apache.directory.api.asn1.EncoderExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()