# Type of request: This is a ...
[ ] bug report
[x] feature request

# Detailed description
As a Developer,
I want to be able to simulate BadDigest and InvalidDigest errors,
So that I can test the error handling logic

## Expected behavior
https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
BadDigest: The Content-MD5 you specified did not match what we received.
InvalidDigest: The Content-MD5 you specified is not valid.

## Actual behavior
localstack returns InvalidDigest when MD5 does not match payload.


return binascii.hexlify(base64.b64decode(b64_string))
def obj_to_xml(obj):
    """ Return an XML representation of the given object (dict, list, or primitive).
        Does NOT add a common root element if the given obj is a list.
        Does NOT work for nested dict structures. """
    if isinstance(obj, list):
        return ''.join([obj_to_xml(o) for o in obj])
    if isinstance(obj, dict):
        return ''.join(['<{k}>{v}</{k}>'.format(k=k, v=obj_to_xml(v)) for (k, v) in obj.items()])
    return str(obj)
def now_utc(millis=False):
    return mktime(datetime.utcnow(), millis=millis)
def now(millis=False):
    return mktime(datetime.now(), millis=millis)
def mktime(timestamp, millis=False):
    if millis:
        epoch = datetime.utcfromtimestamp(0)
        return (timestamp - epoch).total_seconds()
    return calendar.timegm(timestamp.timetuple())
def mkdir(folder):
    if not os.path.exists(folder):
        try:
            os.makedirs(folder)
        except OSError as err:
            
            if err.errno != 17:
                raise
def ensure_readable(file_path, default_perms=None):