public class ETypeInfoEntry extends Object implements org.apache.directory.api.asn1.Asn1Object
ETYPE-INFO-ENTRY ::= SEQUENCE {
etype [0] Int32,
salt [1] OCTET STRING OPTIONAL
}
| Constructor and Description |
|---|
ETypeInfoEntry()
Creates a new instance of ETypeInfoEntry.
|
ETypeInfoEntry(EncryptionType etype,
byte[] salt)
Creates a new instance of ETypeInfoEntry.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the ETYPE-INFO-ENTRY length
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ETYPE-INFO-ENTRY message to a PDU.
|
EncryptionType |
getEType()
Returns the
EncryptionType. |
byte[] |
getSalt()
Returns the salt.
|
void |
setEType(EncryptionType etype) |
void |
setSalt(byte[] salt) |
String |
toString() |
public ETypeInfoEntry(EncryptionType etype, byte[] salt)
etype - the Encryption typesalt - the saltpublic ETypeInfoEntry()
public byte[] getSalt()
public void setSalt(byte[] salt)
salt - the salt to setpublic EncryptionType getEType()
EncryptionType.EncryptionType.public void setEType(EncryptionType etype)
encryptionType - the encryptionType to setpublic int computeLength()
ETYPE-INFO-ENTRY :
0x30 L1 ETYPE-INFO-ENTRY sequence
|
+--> 0xA0 L2 etype tag
| |
| +--> 0x02 L2-1etype (int)
|
+--> 0xA1 L3 salt tag
|
+--> 0x04 L3-1 salt (OCTET STRING)
where L1 = L2 + lenght(0xA0) + length(L2) +
L3 + lenght(0xA1) + length(L3)
and
L2 = L2-1 + length(0x02) + length( L2-1)
L3 = L3-1 + length(0x04) + length( L3-1)
computeLength in interface org.apache.directory.api.asn1.Asn1Objectpublic ByteBuffer encode(ByteBuffer buffer) throws org.apache.directory.api.asn1.EncoderException
ETYPE-INFO-ENTRY :
0x30 LL
0xA1 LL
0x02 0x01 etype
0xA2 LL
0x04 LL salt
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 String toString()
toString in class ObjectObject.toString()Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.