okhttp / okhttp3 / CipherSuite

CipherSuite

class CipherSuite

TLS cipher suites.

Not all cipher suites are supported on all platforms. As newer cipher suites are created (for stronger privacy, better performance, etc.) they will be adopted by the platform and then exposed here. Cipher suites that are not available on either Android (through API level 24) or Java (through JDK 9) are omitted for brevity.

See Android SSLEngine which lists the cipher suites supported by Android.

See JDK Providers which lists the cipher suites supported by Oracle.

See NativeCrypto.java which lists the cipher suites supported by Conscrypt.

Properties

Name Summary
javaName Returns the Java name of this cipher suite. For some older cipher suites the Java name has the prefix SSL_, causing the Java name to be different from the instance name which is always prefixed TLS_. For example, TLS_RSA_EXPORT_WITH_RC4_40_MD5.javaName() is "SSL_RSA_EXPORT_WITH_RC4_40_MD5".val javaName:String

Functions

Name Summary
toString fun toString():String

Companion Object Properties

Name Summary
TLS_AES_128_CCM_8_SHA256 val TLS_AES_128_CCM_8_SHA256:CipherSuite
TLS_AES_128_CCM_SHA256 val TLS_AES_128_CCM_SHA256:CipherSuite
TLS_AES_128_GCM_SHA256 val TLS_AES_128_GCM_SHA256:CipherSuite
TLS_AES_256_GCM_SHA384 val TLS_AES_256_GCM_SHA384:CipherSuite
TLS_CHACHA20_POLY1305_SHA256 val TLS_CHACHA20_POLY1305_SHA256:CipherSuite
TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA val TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA:CipherSuite
TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 val TLS_DH_anon_EXPORT_WITH_RC4_40_MD5:CipherSuite
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA val TLS_DH_anon_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_DH_anon_WITH_AES_128_CBC_SHA val TLS_DH_anon_WITH_AES_128_CBC_SHA:CipherSuite
TLS_DH_anon_WITH_AES_128_CBC_SHA256 val TLS_DH_anon_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_DH_anon_WITH_AES_128_GCM_SHA256 val TLS_DH_anon_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_DH_anon_WITH_AES_256_CBC_SHA val TLS_DH_anon_WITH_AES_256_CBC_SHA:CipherSuite
TLS_DH_anon_WITH_AES_256_CBC_SHA256 val TLS_DH_anon_WITH_AES_256_CBC_SHA256:CipherSuite
TLS_DH_anon_WITH_AES_256_GCM_SHA384 val TLS_DH_anon_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_DH_anon_WITH_DES_CBC_SHA val TLS_DH_anon_WITH_DES_CBC_SHA:CipherSuite
TLS_DH_anon_WITH_RC4_128_MD5 val TLS_DH_anon_WITH_RC4_128_MD5:CipherSuite
TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA val TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA val TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_AES_128_CBC_SHA val TLS_DHE_DSS_WITH_AES_128_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 val TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 val TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_DHE_DSS_WITH_AES_256_CBC_SHA val TLS_DHE_DSS_WITH_AES_256_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 val TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:CipherSuite
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 val TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA val TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA val TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA:CipherSuite
TLS_DHE_DSS_WITH_DES_CBC_SHA val TLS_DHE_DSS_WITH_DES_CBC_SHA:CipherSuite
TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA val TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA val TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_AES_128_CBC_SHA val TLS_DHE_RSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 val TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 val TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_DHE_RSA_WITH_AES_256_CBC_SHA val TLS_DHE_RSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 val TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:CipherSuite
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 val TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA val TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA val TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA:CipherSuite
TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 val TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256:CipherSuite
TLS_DHE_RSA_WITH_DES_CBC_SHA val TLS_DHE_RSA_WITH_DES_CBC_SHA:CipherSuite
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA val TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_ECDH_anon_WITH_AES_128_CBC_SHA val TLS_ECDH_anon_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDH_anon_WITH_AES_256_CBC_SHA val TLS_ECDH_anon_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDH_anon_WITH_NULL_SHA val TLS_ECDH_anon_WITH_NULL_SHA:CipherSuite
TLS_ECDH_anon_WITH_RC4_128_SHA val TLS_ECDH_anon_WITH_RC4_128_SHA:CipherSuite
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA val TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA val TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 val TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 val TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA val TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 val TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384:CipherSuite
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 val TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_ECDH_ECDSA_WITH_NULL_SHA val TLS_ECDH_ECDSA_WITH_NULL_SHA:CipherSuite
TLS_ECDH_ECDSA_WITH_RC4_128_SHA val TLS_ECDH_ECDSA_WITH_RC4_128_SHA:CipherSuite
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA val TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA val TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 val TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 val TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA val TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 val TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384:CipherSuite
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 val TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_ECDH_RSA_WITH_NULL_SHA val TLS_ECDH_RSA_WITH_NULL_SHA:CipherSuite
TLS_ECDH_RSA_WITH_RC4_128_SHA val TLS_ECDH_RSA_WITH_RC4_128_SHA:CipherSuite
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA val TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA val TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 val TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 val TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA val TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 val TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:CipherSuite
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 val TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 val TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:CipherSuite
TLS_ECDHE_ECDSA_WITH_NULL_SHA val TLS_ECDHE_ECDSA_WITH_NULL_SHA:CipherSuite
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA val TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:CipherSuite
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA val TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA val TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 val TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256:CipherSuite
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA val TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA val TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 val TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 val TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA val TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 val TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:CipherSuite
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 val TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 val TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:CipherSuite
TLS_ECDHE_RSA_WITH_NULL_SHA val TLS_ECDHE_RSA_WITH_NULL_SHA:CipherSuite
TLS_ECDHE_RSA_WITH_RC4_128_SHA val TLS_ECDHE_RSA_WITH_RC4_128_SHA:CipherSuite
TLS_EMPTY_RENEGOTIATION_INFO_SCSV val TLS_EMPTY_RENEGOTIATION_INFO_SCSV:CipherSuite
TLS_FALLBACK_SCSV val TLS_FALLBACK_SCSV:CipherSuite
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 val TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5:CipherSuite
TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA val TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA:CipherSuite
TLS_KRB5_EXPORT_WITH_RC4_40_MD5 val TLS_KRB5_EXPORT_WITH_RC4_40_MD5:CipherSuite
TLS_KRB5_EXPORT_WITH_RC4_40_SHA val TLS_KRB5_EXPORT_WITH_RC4_40_SHA:CipherSuite
TLS_KRB5_WITH_3DES_EDE_CBC_MD5 val TLS_KRB5_WITH_3DES_EDE_CBC_MD5:CipherSuite
TLS_KRB5_WITH_3DES_EDE_CBC_SHA val TLS_KRB5_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_KRB5_WITH_DES_CBC_MD5 val TLS_KRB5_WITH_DES_CBC_MD5:CipherSuite
TLS_KRB5_WITH_DES_CBC_SHA val TLS_KRB5_WITH_DES_CBC_SHA:CipherSuite
TLS_KRB5_WITH_RC4_128_MD5 val TLS_KRB5_WITH_RC4_128_MD5:CipherSuite
TLS_KRB5_WITH_RC4_128_SHA val TLS_KRB5_WITH_RC4_128_SHA:CipherSuite
TLS_PSK_WITH_3DES_EDE_CBC_SHA val TLS_PSK_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_PSK_WITH_AES_128_CBC_SHA val TLS_PSK_WITH_AES_128_CBC_SHA:CipherSuite
TLS_PSK_WITH_AES_256_CBC_SHA val TLS_PSK_WITH_AES_256_CBC_SHA:CipherSuite
TLS_PSK_WITH_RC4_128_SHA val TLS_PSK_WITH_RC4_128_SHA:CipherSuite
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA val TLS_RSA_EXPORT_WITH_DES40_CBC_SHA:CipherSuite
TLS_RSA_EXPORT_WITH_RC4_40_MD5 val TLS_RSA_EXPORT_WITH_RC4_40_MD5:CipherSuite
TLS_RSA_WITH_3DES_EDE_CBC_SHA val TLS_RSA_WITH_3DES_EDE_CBC_SHA:CipherSuite
TLS_RSA_WITH_AES_128_CBC_SHA val TLS_RSA_WITH_AES_128_CBC_SHA:CipherSuite
TLS_RSA_WITH_AES_128_CBC_SHA256 val TLS_RSA_WITH_AES_128_CBC_SHA256:CipherSuite
TLS_RSA_WITH_AES_128_GCM_SHA256 val TLS_RSA_WITH_AES_128_GCM_SHA256:CipherSuite
TLS_RSA_WITH_AES_256_CBC_SHA val TLS_RSA_WITH_AES_256_CBC_SHA:CipherSuite
TLS_RSA_WITH_AES_256_CBC_SHA256 val TLS_RSA_WITH_AES_256_CBC_SHA256:CipherSuite
TLS_RSA_WITH_AES_256_GCM_SHA384 val TLS_RSA_WITH_AES_256_GCM_SHA384:CipherSuite
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA val TLS_RSA_WITH_CAMELLIA_128_CBC_SHA:CipherSuite
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA val TLS_RSA_WITH_CAMELLIA_256_CBC_SHA:CipherSuite
TLS_RSA_WITH_DES_CBC_SHA val TLS_RSA_WITH_DES_CBC_SHA:CipherSuite
TLS_RSA_WITH_NULL_MD5 val TLS_RSA_WITH_NULL_MD5:CipherSuite
TLS_RSA_WITH_NULL_SHA val TLS_RSA_WITH_NULL_SHA:CipherSuite
TLS_RSA_WITH_NULL_SHA256 val TLS_RSA_WITH_NULL_SHA256:CipherSuite
TLS_RSA_WITH_RC4_128_MD5 val TLS_RSA_WITH_RC4_128_MD5:CipherSuite
TLS_RSA_WITH_RC4_128_SHA val TLS_RSA_WITH_RC4_128_SHA:CipherSuite
TLS_RSA_WITH_SEED_CBC_SHA val TLS_RSA_WITH_SEED_CBC_SHA:CipherSuite

Companion Object Functions

Name Summary
forJavaName fun forJavaName(javaName:String):CipherSuite