def rehash(path, algo='sha256', blocksize=1<<20):
    h = hashlib.new(algo)
    length = 0
    with open(path, 'rb') as f:
        block = f.read(blocksize)
        while block:
            length += len(block)
            h.update(block)
            block = f.read(blocksize)
    digest = 'sha256='+urlsafe_b64encode(h.digest()).decode('latin1').rstrip('=')
    return (digest, length)
Check the syntax of a given mac address.
dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/pip/wheel.py/rehash--crossover with--dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/common/utils.py/is_valid_mac