Package org.conscrypt

Class CipherSuite

java.lang.Object
org.conscrypt.CipherSuite

public class CipherSuite
extends Object
Represents Cipher Suite as defined in TLS 1.0 spec., A.5. The CipherSuite; C. CipherSuite definitions.
See Also:
TLS 1.0 spec.
  • Method Details

    • getByName

      public static CipherSuite getByName​(String name)
      Returns CipherSuite by name
    • getByCode

      public static CipherSuite getByCode​(byte b1, byte b2)
      Returns CipherSuite based on TLS CipherSuite code
      See Also:
      TLS 1.0 spec., A.5. The CipherSuite
    • getByCode

      public static CipherSuite getByCode​(byte b1, byte b2, byte b3)
      Returns CipherSuite based on V2CipherSpec code as described in TLS 1.0 spec., E. Backward Compatibility With SSL
    • isAnonymous

      public boolean isAnonymous()
      Returns true if cipher suite is anonymous
    • getSupported

      public static CipherSuite[] getSupported()
      Returns array of supported CipherSuites
    • getSupportedCipherSuiteNames

      public static String[] getSupportedCipherSuiteNames()
      Returns array of supported cipher suites names
    • getName

      public String getName()
      Returns cipher suite name
    • toBytes

      public byte[] toBytes()
      Returns cipher suite code as byte array
    • toString

      public String toString()
      Returns cipher suite description
      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.
    • getBulkEncryptionAlgorithm

      public String getBulkEncryptionAlgorithm()
      Returns cipher algorithm name
    • getBlockSize

      public int getBlockSize()
      Returns cipher block size
    • getHmacName

      public String getHmacName()
      Returns MAC algorithm name
    • getHashName

      public String getHashName()
      Returns hash algorithm name
    • getMACLength

      public int getMACLength()
      Returns hash size
    • isExportable

      public boolean isExportable()
      Indicates whether this cipher suite is exportable
    • getServerKeyType

      public String getServerKeyType()
      Returns key type constant suitable for calling X509KeyManager.chooseServerAlias or X509ExtendedKeyManager.chooseEngineServerAlias.
    • getClientKeyType

      public static String getClientKeyType​(byte keyType)
      Similar to getServerKeyType, but returns value given TLS ClientCertificateType byte values from a CertificateRequest message for use with X509KeyManager.chooseClientAlias or X509ExtendedKeyManager.chooseEngineClientAlias.
    • getAuthType

      public String getAuthType​(boolean emphemeral)
      Returns auth type constant suitable for calling X509TrustManager.checkServerTrusted.