TlsExtensionsUtils (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.crypto.tls

## Class TlsExtensionsUtils

- java.lang.Object
- - org.bouncycastle.crypto.tls.TlsExtensionsUtils

-     public class TlsExtensionsUtils
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.Integer` | `EXT_encrypt_then_mac`
    `static java.lang.Integer` | `EXT_extended_master_secret`
    `static java.lang.Integer` | `EXT_heartbeat`
    `static java.lang.Integer` | `EXT_max_fragment_length`
    `static java.lang.Integer` | `EXT_server_name`
    `static java.lang.Integer` | `EXT_status_request`
    `static java.lang.Integer` | `EXT_truncated_hmac`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TlsExtensionsUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addEncryptThenMACExtension(java.util.Hashtable extensions)`
    `static void` | `addExtendedMasterSecretExtension(java.util.Hashtable extensions)`
    `static void` | `addHeartbeatExtension(java.util.Hashtable extensions, HeartbeatExtension heartbeatExtension)`
    `static void` | `addMaxFragmentLengthExtension(java.util.Hashtable extensions, short maxFragmentLength)`
    `static void` | `addServerNameExtension(java.util.Hashtable extensions, ServerNameList serverNameList)`
    `static void` | `addStatusRequestExtension(java.util.Hashtable extensions, CertificateStatusRequest statusRequest)`
    `static void` | `addTruncatedHMacExtension(java.util.Hashtable extensions)`
    `static byte[]` | `createEmptyExtensionData()`
    `static byte[]` | `createEncryptThenMACExtension()`
    `static byte[]` | `createExtendedMasterSecretExtension()`
    `static byte[]` | `createHeartbeatExtension(HeartbeatExtension heartbeatExtension)`
    `static byte[]` | `createMaxFragmentLengthExtension(short maxFragmentLength)`
    `static byte[]` | `createServerNameExtension(ServerNameList serverNameList)`
    `static byte[]` | `createStatusRequestExtension(CertificateStatusRequest statusRequest)`
    `static byte[]` | `createTruncatedHMacExtension()`
    `static java.util.Hashtable` | `ensureExtensionsInitialised(java.util.Hashtable extensions)`
    `static HeartbeatExtension` | `getHeartbeatExtension(java.util.Hashtable extensions)`
    `static short` | `getMaxFragmentLengthExtension(java.util.Hashtable extensions)`
    `static ServerNameList` | `getServerNameExtension(java.util.Hashtable extensions)`
    `static CertificateStatusRequest` | `getStatusRequestExtension(java.util.Hashtable extensions)`
    `static boolean` | `hasEncryptThenMACExtension(java.util.Hashtable extensions)`
    `static boolean` | `hasExtendedMasterSecretExtension(java.util.Hashtable extensions)`
    `static boolean` | `hasTruncatedHMacExtension(java.util.Hashtable extensions)`
    `static boolean` | `readEncryptThenMACExtension(byte[] extensionData)`
    `static boolean` | `readExtendedMasterSecretExtension(byte[] extensionData)`
    `static HeartbeatExtension` | `readHeartbeatExtension(byte[] extensionData)`
    `static short` | `readMaxFragmentLengthExtension(byte[] extensionData)`
    `static ServerNameList` | `readServerNameExtension(byte[] extensionData)`
    `static CertificateStatusRequest` | `readStatusRequestExtension(byte[] extensionData)`
    `static boolean` | `readTruncatedHMacExtension(byte[] extensionData)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EXT_encrypt_then_mac

          public static final java.lang.Integer EXT_encrypt_then_mac

    - #### EXT_extended_master_secret

          public static final java.lang.Integer EXT_extended_master_secret

    - #### EXT_heartbeat

          public static final java.lang.Integer EXT_heartbeat

    - #### EXT_max_fragment_length

          public static final java.lang.Integer EXT_max_fragment_length

    - #### EXT_server_name

          public static final java.lang.Integer EXT_server_name

    - #### EXT_status_request

          public static final java.lang.Integer EXT_status_request

    - #### EXT_truncated_hmac

          public static final java.lang.Integer EXT_truncated_hmac

  - ### Constructor Detail

    - #### TlsExtensionsUtils

          public TlsExtensionsUtils()

  - ### Method Detail

    - #### ensureExtensionsInitialised

          public static java.util.Hashtable ensureExtensionsInitialised(java.util.Hashtable extensions)

    - #### addEncryptThenMACExtension

          public static void addEncryptThenMACExtension(java.util.Hashtable extensions)

    - #### addExtendedMasterSecretExtension

          public static void addExtendedMasterSecretExtension(java.util.Hashtable extensions)

    - #### addHeartbeatExtension

          public static void addHeartbeatExtension(java.util.Hashtable extensions,
                                   HeartbeatExtension heartbeatExtension)
                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addMaxFragmentLengthExtension

          public static void addMaxFragmentLengthExtension(java.util.Hashtable extensions,
                                           short maxFragmentLength)
                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addServerNameExtension

          public static void addServerNameExtension(java.util.Hashtable extensions,
                                    ServerNameList serverNameList)
                                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addStatusRequestExtension

          public static void addStatusRequestExtension(java.util.Hashtable extensions,
                                       CertificateStatusRequest statusRequest)
                                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addTruncatedHMacExtension

          public static void addTruncatedHMacExtension(java.util.Hashtable extensions)

    - #### getHeartbeatExtension

          public static HeartbeatExtension getHeartbeatExtension(java.util.Hashtable extensions)
                                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getMaxFragmentLengthExtension

          public static short getMaxFragmentLengthExtension(java.util.Hashtable extensions)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getServerNameExtension

          public static ServerNameList getServerNameExtension(java.util.Hashtable extensions)
                                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getStatusRequestExtension

          public static CertificateStatusRequest getStatusRequestExtension(java.util.Hashtable extensions)
                                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### hasEncryptThenMACExtension

          public static boolean hasEncryptThenMACExtension(java.util.Hashtable extensions)
                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### hasExtendedMasterSecretExtension

          public static boolean hasExtendedMasterSecretExtension(java.util.Hashtable extensions)
                                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### hasTruncatedHMacExtension

          public static boolean hasTruncatedHMacExtension(java.util.Hashtable extensions)
                                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createEmptyExtensionData

          public static byte[] createEmptyExtensionData()

    - #### createEncryptThenMACExtension

          public static byte[] createEncryptThenMACExtension()

    - #### createExtendedMasterSecretExtension

          public static byte[] createExtendedMasterSecretExtension()

    - #### createHeartbeatExtension

          public static byte[] createHeartbeatExtension(HeartbeatExtension heartbeatExtension)
                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createMaxFragmentLengthExtension

          public static byte[] createMaxFragmentLengthExtension(short maxFragmentLength)
                                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createServerNameExtension

          public static byte[] createServerNameExtension(ServerNameList serverNameList)
                                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createStatusRequestExtension

          public static byte[] createStatusRequestExtension(CertificateStatusRequest statusRequest)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createTruncatedHMacExtension

          public static byte[] createTruncatedHMacExtension()

    - #### readEncryptThenMACExtension

          public static boolean readEncryptThenMACExtension(byte[] extensionData)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readExtendedMasterSecretExtension

          public static boolean readExtendedMasterSecretExtension(byte[] extensionData)
                                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readHeartbeatExtension

          public static HeartbeatExtension readHeartbeatExtension(byte[] extensionData)
                                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readMaxFragmentLengthExtension

          public static short readMaxFragmentLengthExtension(byte[] extensionData)
                                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readServerNameExtension

          public static ServerNameList readServerNameExtension(byte[] extensionData)
                                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readStatusRequestExtension

          public static CertificateStatusRequest readStatusRequestExtension(byte[] extensionData)
                                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readTruncatedHMacExtension

          public static boolean readTruncatedHMacExtension(byte[] extensionData)
                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`