import hashlib


def _get_hasher(type_):
    """
    obtain a hasher instance from the provided type

    Finds and returns an instance which is capable of performing hashing
    operations of an algorithm defined by the ``type`` provided. In the event
    that a hasher cannot be found, this method will return ``None``.

    Args:
        type_: the type of hash

    Returns:
        the hasher instance; ``None`` if the hash type is not supported
    """
    type_ = type_.lower()
    func = getattr(hashlib, type_, None)
    if func:
        return func()
    return None