private function selectCryptoType($version)
    {
        switch ($version)
        {
            case STREAM_CRYPTO_METHOD_SSLv3_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_0_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_1_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_2_SERVER:
                return self::CRYPTO_TYPE_SERVER;

            case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT:
                return self::CRYPTO_TYPE_CLIENT;

            default:
                return self::CRYPTO_TYPE_UNKNOWN;
        }
    }
private function selectCryptoType($version)
    {
        switch ($version)
        {
            case STREAM_CRYPTO_METHOD_SSLv3_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_0_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_1_SERVER:
            case STREAM_CRYPTO_METHOD_TLSv1_2_SERVER:
                return self::CRYPTO_TYPE_SERVER;

            case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT:
            case STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT:
                return self::CRYPTO_TYPE_CLIENT;

            default:
                return self::CRYPTO_TYPE_UNKNOWN;
        }
    }
private function selectCryptoType ( $ version ) { switch ( $ version ) { case STREAM_CRYPTO_METHOD_SSLv3_SERVER : case STREAM_CRYPTO_METHOD_TLSv1_0_SERVER : case STREAM_CRYPTO_METHOD_TLSv1_1_SERVER : case STREAM_CRYPTO_METHOD_TLSv1_2_SERVER : return self :: CRYPTO_TYPE_SERVER ; case STREAM_CRYPTO_METHOD_SSLv3_CLIENT : case STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT : case STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT : case STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT : return self :: CRYPTO_TYPE_CLIENT ; default : return self :: CRYPTO_TYPE_UNKNOWN ; } }
Checks type of crypto.

@param int $version
@return int
Checks type of crypto .