Skip to content

Instantly share code, notes, and snippets.

@kieransnapes
kieransnapes / xero_oath2_django.py
Last active January 22, 2024 13:18
xero oauth2 with django
import os
from functools import wraps
from django.urls import reverse
from django.shortcuts import redirect
from xero_python.api_client import ApiClient, serialize
from xero_python.api_client.configuration import Configuration
from xero_python.api_client.oauth2 import OAuth2Token

Atbash is a simple substitution cipher possible with any known alphabet. It emerged around 500-600 BCE. It works by substituting the letters of an alphabet with another.

Assumptions

CONSTANT = 'abcdefghijklmnopqrstuvwxyz'

A random shuffle of the constant is the cipher.

Example cipher: zyxwvutsrqponmlkjihgfedcba