import hashlib


def get_hasher(authType):
  """
    Return the required hash function based
    on the authentication type required
  """
  if authType == 'md5':
      hasher = hashlib.md5
  elif authType == 'sha':
      hasher = hashlib.sha1
  elif authType == 'sha224':
      hasher = hashlib.sha224
  elif authType == 'sha256':
      hasher = hashlib.sha256
  elif authType == 'sha384':
      hasher = hashlib.sha384
  elif authType == 'sha512':
      hasher = hashlib.sha512
  else:
      hasher = None
  return hasher