<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
!
-->
<refentry xml:id="base64-1" xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>base64</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>base64</application></refname>
<refpurpose>encode and decode base64 strings</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>base64</command>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>base64</command> <arg choice="plain">decode</arg>
<group choice="opt">
<arg choice="plain">-d <replaceable class="parameter">encoded_string</replaceable></arg>
<arg choice="plain">-f <replaceable class="parameter">encoded_file</replaceable></arg>
</group>
<arg>-o <replaceable class="parameter">outfile</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>base64</command> <arg choice="plain">encode</arg>
<group choice="opt">
<arg choice="plain">-d <replaceable class="parameter">string</replaceable></arg>
<arg choice="plain">-f <replaceable class="parameter">file</replaceable></arg>
</group>
<arg>-o <replaceable class="parameter">outfile</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to encode and decode information using base64. If no
input source (string or file) is given, the utility reads the data from the
standard inut.
If no output destination (file) is given, the utility writes the result to the
standard output.
</para>
</refsection>
<refsection>
<title>Subcommands</title>
<para>
The following subcommands are supported.
</para>
<variablelist>
<varlistentry>
<term><command>decode</command></term>
<listitem>
<para>
Decode base64-encoded information into raw data.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>encode</command></term>
<listitem>
<para>
Encode raw data using base64.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-d</option> <replaceable class="parameter">string</replaceable></term>
<listitem>
<para>
The string which should be decoded or encoded, depending on the given subcommand.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option> <replaceable class="parameter">file</replaceable></term>
<listitem>
<para>
The name of the file, whose content should be decoded or encoded, depending on
the the given subcommand.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option> <replaceable class="parameter">file</replaceable></term>
<listitem>
<para>
The name of the file, where the result of this operation, i.e. the encoded or
decoded data should be written.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following command shows the changes from the external change log in
human-readable format.
</para>
<literallayout><prompt
>$ </prompt><command>base64 decode -d YWRkOiBkZXNjcmlwdGlvbgpkZXNjcmlwdGlvbjogQSB0aGlyZCBjaGFuZ2UKLQpyZXBsYWNlOiBtb2RpZmllcnNOYW1lCm1vZGlmaWVyc05hbWU6IGNuPURpcmVjdG9yeSBNYW5hZ2VyLGNuPVJvb3QgRE5zLGNuPWNvbmZpZwotCnJlcGxhY2U6IG1vZGlmeVRpbWVzdGFtcAptb2RpZnlUaW1lc3RhbXA6IDIwMTEwNjEzMDcxMjEwWgotCg==</command></literallayout>
<screen>
add: description
description: A third change
-
replace: modifiersName
modifiersName: cn=Directory Manager,cn=Root DNs,cn=config
-
replace: modifyTimestamp
modifyTimestamp: 20110613071210Z
-
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>