From a14939b0698ae382b9917b59fe0b4a29298f8f0b Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 6 Dec 2021 02:32:24 +0000 Subject: [PATCH] Add base64url --- base64url | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 base64url diff --git a/base64url b/base64url new file mode 100755 index 0000000..1769126 --- /dev/null +++ b/base64url @@ -0,0 +1,5 @@ +#!/bin/bash +# Like base64 but for the URL-safe alphabet A-Za-z0-9-_ (instead of A-Za-z0-9+/). +# This works by replacing occurrences of - with + and vice-versa, and likewise with _ and /. +# Does not support passing the filename by argument. +tr -- '\-_+/' '+/\-_' | base64 "$@"