@classmethod
def GetHasher(cls, hasher_name):
    """Retrieves an instance of a specific hasher.

    Args:
      hasher_name (str): the name of the hasher to retrieve.

    Returns:
      BaseHasher: hasher.

    Raises:
      KeyError: if hasher class is not set for the corresponding name.
    """
    hasher_name = hasher_name.lower()
    if hasher_name not in cls._hasher_classes:
        raise KeyError('hasher class not set for name: {0:s}.'.format(
            hasher_name))
    hasher_class = cls._hasher_classes[hasher_name]
    return hasher_class()
