public class ETypeInfo2Entry
extends org.apache.directory.api.asn1.AbstractAsn1Object
ETYPE-INFO2-ENTRY ::= SEQUENCE {
etype [0] Int32,
salt [1] KerberosString OPTIONAL,
s2kparams [2] OCTET STRING OPTIONAL
}
| 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
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ETYPE-INFO2-ENTRY message to a PDU.
|
EncryptionType |
getEType()
Returns the
EncryptionType. |
byte[] |
getS2kparams()
Returns the s2kparams.
|
String |
getSalt()
Returns the salt.
|
void |
setEType(EncryptionType etype) |
void |
setS2kparams(byte[] s2kparams) |
void |
setSalt(String salt) |
String |
toString() |
public ETypeInfo2Entry()
public ETypeInfo2Entry(EncryptionType etype)
public String getSalt()
public void setSalt(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)
public ByteBuffer encode(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.Asn1Objectencode in class org.apache.directory.api.asn1.AbstractAsn1Objectbuffer - The buffer where to put the PDU. It should have been allocated
before, with the right size.org.apache.directory.api.asn1.EncoderExceptionpublic String toString()
toString in class ObjectObject.toString()Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.