X-Git-Url: https://git.distorted.org.uk/~mdw/chopwood/blobdiff_plain/44e941123a4c6ef44ad4e6856c09a0762b8bce86..40c5485b01a84b8a6b83f0e63576039cb856a36c:/httpauth.py diff --git a/httpauth.py b/httpauth.py index ea978eb..6bb3ec8 100644 --- a/httpauth.py +++ b/httpauth.py @@ -149,9 +149,7 @@ def freshsecret(): def hack_octets(s): """Return the octet string S, in a vaguely pretty form.""" - return BN.b64encode(s) \ - .rstrip('=') \ - .replace('/', '$') + return BN.b64encode(s, '+$').rstrip('=') def auth_tag(sec, stamp, nonce, user): """Compute a tag using secret SEC on `STAMP.NONCE.USER'."""