public static function getVersion(string $response) : int
    {
        if (\strlen($response) < 16) {
            throw new DecryptionFailedException("Message length is too short to determine version.");
        }

        $header = \substr($response, 0, 4);
        if (\strtoupper(\bin2hex($header)) === 'DE259002') {
            return 2;
        }

        return 1;
    }
public static function getVersion(string $response) : int
    {
        if (\strlen($response) < 16) {
            throw new DecryptionFailedException("Message length is too short to determine version.");
        }

        $header = \substr($response, 0, 4);
        if (\strtoupper(\bin2hex($header)) === 'DE259002') {
            return 2;
        }

        return 1;
    }
public static function getVersion ( string $ response ) : int { if ( \ strlen ( $ response ) < 16 ) { throw new DecryptionFailedException ( "Message length is too short to determine version." ) ; } $ header = \ substr ( $ response , 0 , 4 ) ; if ( \ strtoupper ( \ bin2hex ( $ header ) ) === 'DE259002' ) { return 2 ; } return 1 ; }
Extracts the version from the response

@param string $response  The encrypted http response
@return int
Extracts the version from the response