def _strToBase64Binary(v):
    """Rudimentary test for the base64Binary value. The problem is that the built-in b64 module functions ignore the
    fact that only a certain family of characters are allowed to appear in the lexical value, so this is checked first.
    @param v: the literal string defined as a base64encoded string
    @return the decoded (binary) content
    @raise ValueError: invalid base 64 binary value
    """
    import base64
    if v.replace('=', 'x').replace('+', 'y').replace('/', 'z').isalnum():
        try:
            return base64.standard_b64decode(v)
        except:
            raise ValueError('Invalid Base64Binary %s' % v)
    else:
        raise ValueError('Invalid Base64Binary %s' % v)
