diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-10-23 16:31:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-11-01 10:09:19 +0100 |
commit | fc609f75f9c89f098a772ed47184c3bdf086c19d (patch) | |
tree | 7b56a4452aebaa521848af79e7b392a20a5e9f74 /include/crypto | |
parent | 066a6b11456547471e5b1f949b3e9ca0865d79f6 (diff) | |
download | barebox-fc609f75f9c89f098a772ed47184c3bdf086c19d.tar.gz barebox-fc609f75f9c89f098a772ed47184c3bdf086c19d.tar.xz |
lib: base64: add support for base64url
base64url has some small differences to our current base64 implementation:
- Instead of encoding to `+', `-' is used
- Instead of encoding to `/', `_' is used
- Padding with = to reach four byte boundary is optional
- Invalid characters aren't silently skipped
Everything else is the same though, so let's reuse the code and have an
optional url bool parameter control whether to decode base64 or
base64url.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231023143122.1760217-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/crypto')
0 files changed, 0 insertions, 0 deletions