org.apache.directory.shared.kerberos.components
Class PaEncTsEnc

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.components.PaEncTsEnc
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class PaEncTsEnc
extends org.apache.directory.shared.asn1.AbstractAsn1Object

The PaEncTsEnc structure is used to store a PA-ENC-TS-ENC associated to a type. The ASN.1 grammar is :

 PA-ENC-TS-ENC           ::= SEQUENCE {
         patimestamp     [0] KerberosTime -- client's time --,
         pausec          [1] Microseconds OPTIONAL
 }
 

Author:
Apache Directory Project

Constructor Summary
PaEncTsEnc()
          Creates a new instance of PaEncTsEnc.
PaEncTsEnc(KerberosTime paTimestamp, int pausec)
          Creates a new instance of PaEncTsEnc.
 
Method Summary
 int computeLength()
          Compute the PA-ENC-TS-ENC length
 ByteBuffer encode(ByteBuffer buffer)
          Encode the PA-ENC-TS-ENC message to a PDU.
 KerberosTime getPaTimestamp()
          Returns the patimestamp value.
 int getPausec()
           
 void setPaTimestamp(KerberosTime patimestamp)
          Set the patimestamp.
 void setPausec(int pausec)
           
 String toString()
           
 String toString(String tabs)
           
 
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

PaEncTsEnc

public PaEncTsEnc()
Creates a new instance of PaEncTsEnc.


PaEncTsEnc

public PaEncTsEnc(KerberosTime paTimestamp,
                  int pausec)
Creates a new instance of PaEncTsEnc.

Method Detail

getPaTimestamp

public KerberosTime getPaTimestamp()
Returns the patimestamp value.

Returns:
The patimestamp value.

setPaTimestamp

public void setPaTimestamp(KerberosTime patimestamp)
Set the patimestamp.

Parameters:
patimestamp - The patimestamp value

getPausec

public int getPausec()
Returns:
the pausec

setPausec

public void setPausec(int pausec)
Parameters:
pausec - the pausec to set

computeLength

public int computeLength()
Compute the PA-ENC-TS-ENC length
 PA-ENC-TS-ENC :
 
 0x30 L1 PA-ENC-TS-ENC sequence
  |
  +--> 0xA0 0x11 patimestamp tag
  |     |
  |     +--> 0x18 0x0F patimestamp value (KerberosTime)
  |
  +--> 0xA1 L2 pausec tag
        |
        +--> 0x02 L2-1 pausec (INTEGER)
        
  


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the PA-ENC-TS-ENC message to a PDU.
 PA-ENC-TS-ENC :
 
 0x30 LL
   0xA0 0x11 
     0x18 0x0F patimestamp
  [0xA1 LL 
     0x02 LL pausec]
 

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 where to put the PDU. It should have been allocated before, with the right size.
Returns:
The constructed PDU.
Throws:
org.apache.directory.shared.asn1.EncoderException

toString

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

toString

public String toString(String tabs)
See Also:
Object.toString()


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