def parse_token(token):
    token_fragments = token.split(TOKEN_SEPARATOR, 1)
    storage_key = token_fragments[0]
    try:
        decryption_key = token_fragments[1].encode('utf-8')
    except IndexError:
        decryption_key = None
    return (storage_key, decryption_key)
def parse_token(token):
    token_fragments = token.split(TOKEN_SEPARATOR, 1)
    storage_key = token_fragments[0]
    try:
        decryption_key = token_fragments[1].encode('utf-8')
    except IndexError:
        decryption_key = None
    return (storage_key, decryption_key)