summaryrefslogtreecommitdiff
path: root/devdocs/elisp/base-64.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/base-64.html')
-rw-r--r--devdocs/elisp/base-64.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/devdocs/elisp/base-64.html b/devdocs/elisp/base-64.html
new file mode 100644
index 00000000..30c106e7
--- /dev/null
+++ b/devdocs/elisp/base-64.html
@@ -0,0 +1,30 @@
+ <h3 class="section">Base 64 Encoding</h3> <p>Base 64 code is used in email to encode a sequence of 8-bit bytes as a longer sequence of <acronym>ASCII</acronym> graphic characters. It is defined in Internet RFC<a id="DOCF19" href="#FOOT19"><sup>19</sup></a>2045 and also in RFC 4648. This section describes the functions for converting to and from this code. </p> <dl> <dt id="base64-encode-region">Command: <strong>base64-encode-region</strong> <em>beg end &amp;optional no-line-break</em>
+</dt> <dd>
+<p>This function converts the region from <var>beg</var> to <var>end</var> into base 64 code. It returns the length of the encoded text. An error is signaled if a character in the region is multibyte, i.e., in a multibyte buffer the region must contain only characters from the charsets <code>ascii</code>, <code>eight-bit-control</code> and <code>eight-bit-graphic</code>. </p> <p>Normally, this function inserts newline characters into the encoded text, to avoid overlong lines. However, if the optional argument <var>no-line-break</var> is non-<code>nil</code>, these newlines are not added, so the output is just one long line. </p>
+</dd>
+</dl> <dl> <dt id="base64url-encode-region">Command: <strong>base64url-encode-region</strong> <em>beg end &amp;optional no-pad</em>
+</dt> <dd>
+<p>This function is like <code>base64-encode-region</code>, but it implements the URL variant of base 64 encoding, per RFC 4648, and it doesn’t insert newline characters into the encoded text, so the output is just one long line. </p> <p>If the optional argument <var>no-pad</var> is non-<code>nil</code> then this function doesn’t generate the padding (<code>=</code>). </p>
+</dd>
+</dl> <dl> <dt id="base64-encode-string">Function: <strong>base64-encode-string</strong> <em>string &amp;optional no-line-break</em>
+</dt> <dd>
+<p>This function converts the string <var>string</var> into base 64 code. It returns a string containing the encoded text. As for <code>base64-encode-region</code>, an error is signaled if a character in the string is multibyte. </p> <p>Normally, this function inserts newline characters into the encoded text, to avoid overlong lines. However, if the optional argument <var>no-line-break</var> is non-<code>nil</code>, these newlines are not added, so the result string is just one long line. </p>
+</dd>
+</dl> <dl> <dt id="base64url-encode-string">Function: <strong>base64url-encode-string</strong> <em>string &amp;optional no-pad</em>
+</dt> <dd>
+<p>Like <code>base64-encode-string</code>, but generates the URL variant of base 64, and doesn’t insert newline characters into the encoded text, so the result is just one long line. </p> <p>If the optional argument <var>no-pad</var> is non-<code>nil</code> then this function doesn’t generate the padding. </p>
+</dd>
+</dl> <dl> <dt id="base64-decode-region">Command: <strong>base64-decode-region</strong> <em>beg end &amp;optional base64url</em>
+</dt> <dd>
+<p>This function converts the region from <var>beg</var> to <var>end</var> from base 64 code into the corresponding decoded text. It returns the length of the decoded text. </p> <p>The decoding functions ignore newline characters in the encoded text. </p> <p>If optional argument <var>base64url</var> is non-<code>nil</code>, then padding is optional, and the URL variant of base 64 encoding is used. </p>
+</dd>
+</dl> <dl> <dt id="base64-decode-string">Function: <strong>base64-decode-string</strong> <em>string &amp;optional base64url</em>
+</dt> <dd>
+<p>This function converts the string <var>string</var> from base 64 code into the corresponding decoded text. It returns a unibyte string containing the decoded text. </p> <p>The decoding functions ignore newline characters in the encoded text. </p> <p>If optional argument <var>base64url</var> is non-<code>nil</code>, then padding is optional, and the URL variant of base 64 encoding is used. </p>
+</dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Base-64.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Base-64.html</a>
+ </p>
+</div>