# Path: fastavro/const.py
# INT_MIN_VALUE = -(1 << 31)
# 
# INT_MAX_VALUE = (1 << 31) - 1
# 
# LONG_MIN_VALUE = -(1 << 63)
# 
# LONG_MAX_VALUE = (1 << 63) - 1
# 
# Path: fastavro/schema.py
# FINGERPRINT_ALGORITHMS = _schema.FINGERPRINT_ALGORITHMS
# 
# Path: fastavro/types.py

# 
# Path: fastavro/_schema_common.py
# PRIMITIVES = {
#     "boolean",
#     "bytes",
#     "double",
#     "float",
#     "int",
#     "long",
#     "null",
#     "string",
# }


from hashlib import md5
from string import ascii_letters
from typing import Any, Iterator, Dict, List, cast
from .const import INT_MIN_VALUE, INT_MAX_VALUE, LONG_MIN_VALUE, LONG_MAX_VALUE
from .schema import extract_record_type, parse_schema
from .types import Schema, NamedSchemas
from ._schema_common import PRIMITIVES
import random



def _randbytes(num: int) -> bytes:
    # TODO: Use random.randbytes when this library is Python 3.9+ only
    return random.getrandbits(num * 8).to_bytes(num, "little")


def _md5(string: str) -> str:

# Path: fastavro/const.py
# INT_MIN_VALUE = -(1 << 31)
# 
# INT_MAX_VALUE = (1 << 31) - 1
# 
# LONG_MIN_VALUE = -(1 << 63)
# 
# LONG_MAX_VALUE = (1 << 63) - 1
# 
# Path: fastavro/schema.py
# FINGERPRINT_ALGORITHMS = _schema.FINGERPRINT_ALGORITHMS
# 
# Path: fastavro/types.py

# 
# Path: fastavro/_schema_common.py
# PRIMITIVES = {
#     "boolean",
#     "bytes",
#     "double",
#     "float",
#     "int",
#     "long",
#     "null",
#     "string",
# }


# Path: fastavro/utils.py
from hashlib import md5
from string import ascii_letters
from typing import Any, Iterator, Dict, List, cast
from .const import INT_MIN_VALUE, INT_MAX_VALUE, LONG_MIN_VALUE, LONG_MAX_VALUE
from .schema import extract_record_type, parse_schema
from .types import Schema, NamedSchemas
from ._schema_common import PRIMITIVES
import random




def _randbytes(num: int) -> bytes:
    # TODO: Use random.randbytes when this library is Python 3.9+ only
    return random.getrandbits(num * 8).to_bytes(num, "little")


def _md5(string: str) -> str:

    return md5(string.encode()).hexdigest()