Class Authentication

    • Field Detail

      • nextHeader

        protected byte nextHeader
      • payloadLength

        protected byte payloadLength
      • securityParamIndex

        protected int securityParamIndex
      • sequence

        protected int sequence
      • integrityCheck

        protected byte[] integrityCheck
    • Constructor Detail

      • Authentication

        public Authentication()
    • Method Detail

      • getPayloadLength

        public byte getPayloadLength()
        Gets the payload length of this header.
        Returns:
        the payload length
      • setPayloadLength

        public Authentication setPayloadLength​(byte payloadLength)
        Sets the payload length of this header.
        Parameters:
        payloadLength - the payload length to set
        Returns:
        this
      • getSecurityParamIndex

        public int getSecurityParamIndex()
        Gets the security parameter index of this header.
        Returns:
        the security parameter index
      • setSecurityParamIndex

        public Authentication setSecurityParamIndex​(int securityParamIndex)
        Sets the security parameter index of this header.
        Parameters:
        securityParamIndex - the security parameter index to set
        Returns:
        this
      • getSequence

        public int getSequence()
        Gets the sequence number of this header.
        Returns:
        the sequence number
      • setSequence

        public Authentication setSequence​(int sequence)
        Sets the sequence number of this header.
        Parameters:
        sequence - the sequence number to set
        Returns:
        this
      • getIntegrityCheck

        public byte[] getIntegrityCheck()
        Gets the integrity check value of this header.
        Returns:
        the integrity check value
      • setIngegrityCheck

        public Authentication setIngegrityCheck​(byte[] integrityCheck)
        Sets the integrity check value of this header.
        Parameters:
        integrityCheck - the integrity check value to set
        Returns:
        this
      • getTotalLength

        public int getTotalLength()
        Gets the total length of this header. According to spec, payload length should be the total length of this AH in 4-octet unit, minus 2
        Returns:
        the total length
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Specified by:
        serialize in interface IPacket
        Returns:
        a byte[] containing this packet and payloads
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class BasePacket
      • deserializer

        public static Deserializer<Authentication> deserializer()
        Deserializer function for authentication headers.
        Returns:
        deserializer function
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object