1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-22 01:02:17 -05:00

example commands

This commit is contained in:
stpeter 2011-01-05 11:51:04 -07:00
parent 4a776805d0
commit 3bd448c944

View File

@ -222,13 +222,13 @@
</query> </query>
</iq> </iq>
]]></code> ]]></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> <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> <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> </code>
</section2> </section2>
<section2 topic='Conformance Terms' anchor='style-conf'> <section2 topic='Conformance Terms' anchor='style-conf'>