Compute the required standard security handler version based on the RC4 key size.
 _key_size_:: Key size in bits.
 Returns [ version, revision ].
4959
def crypto_revision_from_rc4_key(key_size)
            raise EncryptionError, "Invalid RC4 key length" unless key_size.between?(40, 128) and key_size % 8 == 0

            if key_size > 40
                version = 2
                revision = 3
            else
                version = 1
                revision = 2
            end

            [ version, revision ]
        end
1031235
def get_firmware_version(self, cb=None):
        
        task = asyncio.ensure_future(self.core.get_firmware_version())
        version = self.loop.run_until_complete(task)
        if cb:
            cb(version)
        else:
            return version
917354
def size(self):
        
        return int(self._client.hget(self._bucket_key, self.key_prefix) or 0)
458172
def version(self, conn):
        

        command = b'version\r\n'
        response = yield from self._execute_simple_command(
            conn, command)
        if not response.startswith(const.VERSION):
            raise ClientException('Memcached version failed', response)
        version, number = response.split()
        return number
1197661
def assert_valid_key_size(key)
      expected_key_size = model_key.size
      actual_key_size   = key.size

      if actual_key_size != expected_key_size
        raise ArgumentError, "The number of arguments for the key is invalid, expected #{expected_key_size} but was #{actual_key_size}"
      end
    end
296073
def estimate_size_in_bytes(cls, key, value, headers):
        
        return (
            cls.HEADER_STRUCT.size + cls.MAX_RECORD_OVERHEAD +
            cls.size_of(key, value, headers)
        )
1309631
def get_full_python_version():
    
    # Get version part, e.g. `3.5.1.final.0`
    version_part = '.'.join(str(x) for x in sys.version_info)

    # Get integer width, e.g. 32 or 64
    int_width = struct.calcsize('P') * 8

    # Get integer width part, e.g. `64bit` or `32bit`
    int_width_part = str(int_width) + 'bit'

    # Return full Python version
    return version_part + '.' + int_width_part
557660
def version(self) -> int:
        
        version = self._config.get('version', 1)

        if version not in SUPPORTED_SCENARIO_VERSIONS:
            raise InvalidScenarioVersion(f'Unexpected scenario version {version}')
        return version
784816
def Size(self):
        
        return s.uint32 + s.uint64 + s.uint32 + s.uint16 + s.uint32 + GetVarSize(self.UserAgent) + s.uint32 + s.uint8
203171
def calculate_size(name, listener_flags, local_only):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    data_size += BOOLEAN_SIZE_IN_BYTES
    return data_size
1346715
def cmp(cls, v1: 'VersionBase', v2: 'VersionBase') -> int:
        
        # TODO types checking
        if v1._version > v2._version:
            return 1
        elif v1._version == v2._version:
            return 0
        else:
            return -1
676974
def key_size(self):
        
        if self.key_algorithm in {PubKeyAlgorithm.ECDSA, PubKeyAlgorithm.ECDH}:
            return self._key.keymaterial.oid
        return next(iter(self._key.keymaterial)).bit_length()
819876
def nvrtcVersion(self):
        
        major = c_int()
        minor = c_int()
        code = self._lib.nvrtcVersion(byref(major), byref(minor))
        self._throw_on_error(code)
        return (major.value, minor.value)
441014
def get(version: str) -> 'Protocol':
        

        return Protocol.V_13 if version == Protocol.V_13.value.name else Protocol.DEFAULT
619186
def get_version(full=False):
    
    version = '.'.join([str(bit) for bit in __version__[:3]])

    if full:
        version = '-'.join([version] + list(__version__[3:]))

    return version
911226
def version
      SelectVersionsQuery.new.fetch_first || Version.new('0')
    rescue Cassandra::Errors::InvalidError
      raise uninitialized_error
    end
1288800
def to_payload
      version.htb << [depth].pack('C') << parent_fingerprint.htb <<
          [number].pack('N') << chain_code << [0x00].pack('C') << key.priv_key.htb
    end