src/dirbs/utils.py
def hash_string_64bit(s):
    """
    Basic string hash based on taking an initial prime number and multiplying it by another prime number.

    Arguments:
        s: string to hash
    Returns:
        hashed string
    """
    string_hash = 7
    string_bytes = bytearray(s, 'utf-8')
    for b in string_bytes:
        string_hash = string_hash * 31 + b

    return string_hash % (pow(2, 63) - 1)

    Basic string hash based on taking an initial prime number and multiplying it by another prime number.

    Arguments:
        s: string to hash
    Returns:
        hashed string
    
Basic string hash based on taking an initial prime number and multiplying it by another prime number.
Basic string hash based on taking an initial prime number and multiplying it by another prime number .
def hash_string_64bit(s):
    string_hash = 7
    string_bytes = bytearray(s, 'utf-8')
    for b in string_bytes:
        string_hash = string_hash * 31 + b
    return string_hash % (pow(2, 63) - 1)
def hash_string_64bit ( s ) : string_hash = 7 string_bytes = bytearray ( s , 'utf-8' ) for b in string_bytes : string_hash = string_hash * 31 + b return string_hash % ( pow ( 2 , 63 ) - 1 )
Basic string hash based on taking an initial prime number and multiplying it by another prime number.
Basic string hash based on taking an initial prime number and multiplying it by another prime number .
"""
    Basic string hash based on taking an initial prime number and multiplying it by another prime number.

    Arguments:
        s: string to hash
    Returns:
        hashed string
    """
None
s
string to hash
string to hash