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

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.KrbSafe
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class KrbSafe
extends KerberosMessage

Class representing KRB-SAFE message

 KRB-SAFE        ::= [APPLICATION 20] SEQUENCE {
      pvno            [0] INTEGER (5),
      msg-type        [1] INTEGER (20),
      safe-body       [2] KRB-SAFE-BODY,
      cksum           [3] Checksum
 }
 

Author:
Apache Directory Project

Constructor Summary
KrbSafe()
          Creates a new instance of KrbSafe.
 
Method Summary
 int computeLength()
          Compute the KRB-SAFE length
 ByteBuffer encode(ByteBuffer buffer)
          
 Checksum getChecksum()
           
 KrbSafeBody getSafeBody()
           
 void setChecksum(Checksum checksum)
           
 void setSafeBody(KrbSafeBody safeBody)
           
 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

KrbSafe

public KrbSafe()
Creates a new instance of KrbSafe.

Method Detail

getSafeBody

public KrbSafeBody getSafeBody()
Returns:
the krbSafeBody

setSafeBody

public void setSafeBody(KrbSafeBody safeBody)
Parameters:
safeBody - the KrbSafeBody to set

getChecksum

public Checksum getChecksum()
Returns:
the checksum

setChecksum

public void setChecksum(Checksum checksum)
Parameters:
checksum - the checksum to set

computeLength

public int computeLength()
Compute the KRB-SAFE length
 KRB-SAFE :
 
 0x74 L1 KRB-SAFE APPLICATION[20]
  |
  +--> 0x30 L2 KRB-ERROR sequence
        |
        +--> 0xA0 0x03 pvno tag
        |     |
        |     +--> 0x02 0x01 0x05 pvno (5)
        |
        +--> 0xA1 0x03 msg-type tag
        |     |
        |     +--> 0x02 0x01 0x14 msg-type (20)
        |     
        +--> 0xA2 L3 safe-body tag
        |     |
        |     +--> 0x30 L3-1 safe-body (KRB-SAFE-BODY)
        |
        +--> 0xA3 L4 cksum tag
              |
              +--> 0x30 L4-1 cksum (CHECKSUM)
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Throws:
org.apache.directory.shared.asn1.EncoderException

toString

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


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