reddit-image-wall-getter/reddit_imgs/system/hexhashof.py

9 lines
208 B
Python

#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from typing import Any, Callable, Type
def hexhashof(bts: bytes, using: Callable[[], Any]) -> str:
m = using()
m.update(bts)
return m.hexdigest()