org.apache.directory.shared.kerberos.messages
Class ApRep

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.messages.KerberosMessage
          extended by org.apache.directory.shared.kerberos.messages.ApRep
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class ApRep
extends KerberosMessage

AP-REP message. It will store the object described by the ASN.1 grammar :

 AP-REP          ::= [APPLICATION 15] SEQUENCE {
         pvno            [0] INTEGER (5),
         msg-type        [1] INTEGER (15),
         enc-part        [2]  -- EncAPRepPart
 }
 

Author:
Apache Directory Project

Constructor Summary
ApRep()
          Creates a new instance of AP-REP.
 
Method Summary
 int computeLength()
          Compute the AP-REP length
 ByteBuffer encode(ByteBuffer buffer)
          Encode the AP-REP component
 EncryptedData getEncPart()
          Returns the EncryptedData.
 void setEncPart(EncryptedData encPart)
          Sets the EncryptedData.
 String toString()
           
 
Methods inherited from class org.apache.directory.shared.kerberos.messages.KerberosMessage
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumber
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApRep

public ApRep()
Creates a new instance of AP-REP.

Method Detail

getEncPart

public EncryptedData getEncPart()
Returns the EncryptedData.

Returns:
The EncryptedData.

setEncPart

public void setEncPart(EncryptedData encPart)
Sets the EncryptedData.

Parameters:
encPart - The encrypted part

computeLength

public int computeLength()
Compute the AP-REP length
 AP-REP :
 
 0x6F L1 AP-REP message
  |
  +--> 0x30 L2 
        |
        +--> 0xA0 0x03 
        |     |
        |     +--> 0x02 0x01 0x05 pvno
        |
        +--> 0xA1 0x03
        |     |
        |     +--> 0x02 0x01 0x0E msg-type
        |
        +--> 0xA2 L3
              |
              +--> 0x30 L3-1 enc-part
         
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the AP-REP component

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Parameters:
buffer - The buffer containing the encoded result
Returns:
The encoded component
Throws:
org.apache.directory.shared.asn1.EncoderException - If the encoding failed

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.