example commands

This commit is contained in:
stpeter 2011-01-05 11:51:04 -07:00
parent 4a776805d0
commit 3bd448c944
1 changed files with 5 additions and 5 deletions

View File

@ -222,13 +222,13 @@
</query>
</iq>
]]></code>
<p>Some examples (e.g., SASL examples) include strings that are encoded using Base64 (see &rfc3548;). An easy way to generate these is to use the <link url='http://www.openssl.org/'>OpenSSL</link> "enc" command to generate the base64-encoded equivalent. For example, the following command will generate the base64-encoded string "YmFyZEBzaGFrZXNwZWFyZS5saXQ=":</p>
<code>
echo -n 'bard@shakespeare.lit' | openssl enc -base64
</code>
<p>Some examples (e.g., avatar examples) include strings that are SHA-1 hashes (see &rfc3174;). An easy way to generate these is to use the <link url='http://www.openssl.org/'>OpenSSL</link> "dgst" command to generate the SHA-1 hash. For example, the following command will generate the SHA-1 hash "9f5f9fdab9da7fc12e3c52b258acbcb4bb8e66ac":</p>
<code>
echo -n 'bard@shakespeare.lit' | openssl dgst -sha1
echo -n 'bard@shakespeare.lit' | openssl dgst -hex -sha1
</code>
<p>Some examples (e.g., SASL examples) include strings that are encoded using Base64 (see &rfc3548;). An easy way to generate these is to use the <link url='http://www.openssl.org/'>OpenSSL</link> "enc" command to generate the base64-encoded equivalent. For example, the following command will generate the base64-encoded string "YmFyZEBzaGFrZXNwZWFyZS5saXQ=":</p>
<code>
echo -n 'bard@shakespeare.lit' | openssl enc -nopad -base64
</code>
</section2>
<section2 topic='Conformance Terms' anchor='style-conf'>