.\" Copyright (c) 2018-2022, OARC, Inc. .\" All rights reserved. .\" .\" This file is part of dnsjit. .\" .\" dnsjit is free software: you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation, either version 3 of the License, or .\" (at your option) any later version. .\" .\" dnsjit is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with dnsjit. If not, see . .\" .TH dnsjit.lib.base64url 3 "1.2.3" "dnsjit" .SH NAME dnsjit.lib.base64url \- Utility library to convert data to base64url format .SH SYNOPSIS local base64url = require("dnsjit.lib.base64url") .SS Encoding and decoding lua strings local encoded = base64url.encode("abcd") local decoded = base64url.decode(encoded) .SS Encoding C byte arrays local pl -- pl is core.object.payload local encoded = base64url.encode(pl.payload, pl.len) .SH DESCRIPTION Encode and decode data to/from base64url format. .SS Functions .TP .BR Base64Url.encode "(data, data_len)" Encode lua string or C byte array to base64url representation. The input string may contain non-printable characters. .B data_len is length of the input data (optional for lua strings, required for C byte arrays). .TP .BR Base64Url.decode "(data)" Decode a base64url encoded lua string. The output string may contain non-printable characters. .SH SEE ALSO .BR dnsjit.core.object.payload (3) .SH AUTHORS and CONTRIBUTORS Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC) .LP Maintained by DNS-OARC .LP .RS .I https://www.dns-oarc.net/ .RE .LP .SH BUGS For issues and feature requests please use: .LP .RS \fIhttps://github.com/DNS-OARC/dnsjit/issues\fP .RE .LP For question and help please use: .LP .RS \fIadmin@dns-oarc.net\fP .RE .LP