[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: Remove obsolete mcrypt example
From: Kamil Tekiela via GitHub <noreply () php ! net>
Date: 2021-06-23 21:51:41
Message-ID: FmtxLpfbW3pFJNnJaXZwwV4isPT4LQgkccfSsSXJk () main ! php ! net
[Download RAW message or body]
Author: Kamil Tekiela (kamil-tekiela)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2021-06-23T23:51:59+02:00
Commit: https://github.com/php/doc-en/commit/67ae2b943e98fcbf3f3f93e8bce6eca97c2c859d
Raw diff: https://github.com/php/doc-en/commit/67ae2b943e98fcbf3f3f93e8bce6eca97c2c859d.diff
Remove obsolete mcrypt example
Closes GH-717.
Changed paths:
D reference/mcrypt/examples.xml
M reference/mcrypt/book.xml
Diff:
diff --git a/reference/mcrypt/book.xml b/reference/mcrypt/book.xml
index 1194d4f5f5..e8912dc4ab 100644
--- a/reference/mcrypt/book.xml
+++ b/reference/mcrypt/book.xml
@@ -41,7 +41,6 @@
&reference.mcrypt.setup;
&reference.mcrypt.constants;
&reference.mcrypt.ciphers;
- &reference.mcrypt.examples;
&reference.mcrypt.reference;
</book>
diff --git a/reference/mcrypt/examples.xml b/reference/mcrypt/examples.xml
deleted file mode 100644
index 279a6d100f..0000000000
--- a/reference/mcrypt/examples.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision$ -->
-
-<appendix xml:id="mcrypt.examples" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink">
- &reftitle.examples;
- <para>
- Mcrypt can be used to encrypt and decrypt using the above
- mentioned ciphers. If you linked against <literal>libmcrypt-2.2.x</literal>, the
- four important mcrypt commands (<function>mcrypt_cfb</function>,
- <function>mcrypt_cbc</function>, <function>mcrypt_ecb</function>,
- and <function>mcrypt_ofb</function>) can operate in both modes
- which are named <constant>MCRYPT_ENCRYPT</constant> and
- <constant>MCRYPT_DECRYPT</constant>, respectively.
- </para>
- <para>
- If you linked against libmcrypt 2.4.x or 2.5.x, these functions are still
- available, but it is recommended that you use the advanced functions.
- <example>
- <title>Encrypt an input value with <literal>AES</literal> with a 256-bit key \
under 2.4.x and higher in <literal>CBC</literal> mode</title>
- <programlisting role="php">
-<![CDATA[
-<?php
- $key = hash('sha256', 'this is a secret key', true);
- $input = "Let us meet at 9 o'clock at the secret place.";
-
- $td = mcrypt_module_open('rijndael-128', '', 'cbc', '');
- $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_DEV_URANDOM);
- mcrypt_generic_init($td, $key, $iv);
- $encrypted_data = mcrypt_generic($td, $input);
- mcrypt_generic_deinit($td);
- mcrypt_module_close($td);
-?>
-]]>
- </programlisting>
- </example>
- This example will give you the encrypted data as a string in
- <literal>$encrypted_data</literal>. For a full example see
- <function>mcrypt_module_open</function>.
- </para>
-</appendix>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-indent-tabs-mode:nil
-sgml-parent-document:nil
-sgml-default-dtd-file:"~/.phpdoc/manual.ced"
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
-vim600: syn=xml fen fdm=syntax fdl=2 si
-vim: et tw=78 syn=sgml
-vi: ts=1 sw=1
--->
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic