import hashlib class message_coder: @staticmethod def type_size() -> int: return 2 @staticmethod def hash_size() -> int: return 20 @staticmethod def _get_hash(target: bytes) -> bytes: return hashlib.sha1(target, usedforsecurity = False).digest()