summaryrefslogtreecommitdiffstats
path: root/include/base64.h
Commit message (Collapse)AuthorAgeFilesLines
* lib: base64: add support for base64urlAhmad Fatoum2023-11-011-0/+1
| | | | | | | | | | | | | | | | | 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>
* include: add SPDX-License-IdentifierAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | All these files lack a license statement, so add the default GPL-2.0-only. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: add base64 helpersSteffen Trumtrar2019-04-121-0/+9
Import the busybox-1.23.1 uuencode/base64 helper functions. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>