third_party/sqlite/scripts/sqlite_cherry_picker.py
def calc_hash(data, method):
        """Return the string sha1 or sha3 hash digest for the given data."""
        if method == 'sha3':
            h = hashlib.sha3_256()
        elif method == 'sha1':
            h = hashlib.sha1()
        else:
            assert False
        h.update(data)
        return h.hexdigest()
Return the string sha1 or sha3 hash digest for the given data.
Return the string sha1 or sha3 hash digest for the given data.
Return the string sha1 or sha3 hash digest for the given data .
def calc_hash(data, method):
        if method == 'sha3':
            h = hashlib.sha3_256()
        elif method == 'sha1':
            h = hashlib.sha1()
        else:
            assert False
        h.update(data)
        return h.hexdigest()
def calc_hash ( data , method ) : if method == 'sha3' : h = hashlib . sha3_256 ( ) elif method == 'sha1' : h = hashlib . sha1 ( ) else : assert False h . update ( data ) return h . hexdigest ( )
Return the string sha1 or sha3 hash digest for the given data.
Return the string sha1 or sha3 hash digest for the given data .
"""Return the string sha1 or sha3 hash digest for the given data."""
data
method