def _determine_hash_type(args):
    """Return hash_type value to use as argument for Siegfried

    Defaults to md5 if no or invalid user input.
    """
    HASH_CHOICES = ("sha1", "sha256", "sha512")
    if args.hash and args.hash.lower() in HASH_CHOICES:
        return args.hash.lower()
    return "md5"