docs: def scrypt_mcf_check(scrypt, mcf, password):
      """Returns True if the password matches the given MCF hash
  
      Supports both the libscrypt $s1$ format and the $7$ format.
      """
      if not isinstance(mcf, bytes):
          raise TypeError('MCF must be a byte string')
      if isinstance(password, unicode):
          password = password.encode('utf8')
      elif not isinstance(password, bytes):
          raise TypeError('password must be a unicode or byte string')
  
      N, r, p, salt, hash, hlen = _scrypt_mcf_decode(mcf)
      h = scrypt(password, salt, N=N, r=r, p=p, olen=hlen)
      cmp = 0
      for i, j in zip(bytearray(h), bytearray(hash)):
          cmp |= i ^ j
      return cmp == 0