IT. Expert System.

Android Reference

ConnectionState


org.apache.harmony.xnet.provider.jsse

Class ConnectionState

  • Direct Known Subclasses:
    ConnectionStateSSLv3, ConnectionStateTLS


    public abstract class ConnectionState
    extends Object
    This abstract class is a base for Record Protocol operating environmet of different SSL protocol versions.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected int block_size
      The block size, or zero if not a block cipher
      protected Cipher decCipher
      The cipher used for decode operations
      protected Cipher encCipher
      The cipher used for encode operations
      protected int hash_size
      The size of MAC used under this connection state
      protected Logger.Stream logger
      protected byte[] read_seq_num
      Read sequence number which is incremented after each decrypt call
      protected byte[] write_seq_num
      Write sequence number which is incremented after each encrypt call
    • Constructor Summary

      Constructors
      Constructor and Description
      ConnectionState()
    • Method Summary

      Methods
      Modifier and Type Method and Description
      protected byte[] decrypt(byte type, byte[] fragment)
      Retrieves the fragment of the Plaintext structure of the specified type from the provided data.
      protected abstract byte[] decrypt(byte type, byte[] fragment, int offset, int len)
      Retrieves the fragment of the Plaintext structure of the specified type from the provided data.
      protected byte[] encrypt(byte type, byte[] fragment)
      Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.
      protected abstract byte[] encrypt(byte type, byte[] fragment, int offset, int len)
      Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.
      protected int getContentSize(int generic_cipher_size)
      Returns the minimal upper bound of the content size enclosed into the Generic[Stream|Generic]Cipher structure of specified size.
      protected int getFragmentSize(int content_size)
      Returns the size of the Generic[Stream|Generic]Cipher structure corresponding to the content data of specified size.
      protected int getMinFragmentSize()
      Returns the minimal possible size of the Generic[Stream|Generic]Cipher structure under this connection state.
      protected int getPaddingSize(int content_size)
      Returns the number of bytes of padding required to round the content up to the required block size.
      protected static void incSequenceNumber(byte[] seq_num)
      Increments the sequence number.
      protected void shutdown()
      Shutdownes the protocol.
    • Field Detail

      • encCipher

        protected Cipher encCipher
        The cipher used for encode operations
      • decCipher

        protected Cipher decCipher
        The cipher used for decode operations
      • block_size

        protected int block_size
        The block size, or zero if not a block cipher
      • hash_size

        protected int hash_size
        The size of MAC used under this connection state
      • write_seq_num

        protected final byte[] write_seq_num
        Write sequence number which is incremented after each encrypt call
      • read_seq_num

        protected final byte[] read_seq_num
        Read sequence number which is incremented after each decrypt call
    • Constructor Detail

      • ConnectionState

        public ConnectionState()
    • Method Detail

      • getMinFragmentSize

        protected int getMinFragmentSize()
        Returns the minimal possible size of the Generic[Stream|Generic]Cipher structure under this connection state.
      • getFragmentSize

        protected int getFragmentSize(int content_size)
        Returns the size of the Generic[Stream|Generic]Cipher structure corresponding to the content data of specified size.
      • getContentSize

        protected int getContentSize(int generic_cipher_size)
        Returns the minimal upper bound of the content size enclosed into the Generic[Stream|Generic]Cipher structure of specified size. For stream ciphers the returned value will be exact value.
      • getPaddingSize

        protected int getPaddingSize(int content_size)
        Returns the number of bytes of padding required to round the content up to the required block size. Assumes power of two block size.
      • encrypt

        protected byte[] encrypt(byte type,
                     byte[] fragment)
        Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.
        Parameters:
        type - - the ContentType of the provided data
        fragment - - the byte array containing the data to be encrypted under the current connection state.
      • encrypt

        protected abstract byte[] encrypt(byte type,
                     byte[] fragment,
                     int offset,
                     int len)
        Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.
        Parameters:
        type - - the ContentType of the provided data
        fragment - - the byte array containing the data to be encrypted under the current connection state.
        offset - - the offset from which the data begins with.
        len - - the length of the data.
      • decrypt

        protected byte[] decrypt(byte type,
                     byte[] fragment)
        Retrieves the fragment of the Plaintext structure of the specified type from the provided data.
        Parameters:
        type - - the ContentType of the data to be decrypted.
        fragment - - the byte array containing the data to be encrypted under the current connection state.
      • decrypt

        protected abstract byte[] decrypt(byte type,
                     byte[] fragment,
                     int offset,
                     int len)
        Retrieves the fragment of the Plaintext structure of the specified type from the provided data.
        Parameters:
        type - - the ContentType of the data to be decrypted.
        fragment - - the byte array containing the data to be encrypted under the current connection state.
        offset - - the offset from which the data begins with.
        len - - the length of the data.
      • incSequenceNumber

        protected static void incSequenceNumber(byte[] seq_num)
        Increments the sequence number.
      • shutdown

        protected void shutdown()
        Shutdownes the protocol. It will be impossiblke to use the instance after the calling of this method.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2157 / . Delta: 0.02312 с