From 4a5d31d554bd9208d62867842522926e67639705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Braian=20Iv=C3=A1n=20Monnier?= Date: Fri, 17 Dec 2010 19:06:44 +0000 Subject: [PATCH] Typos fixed, and some files were restructured git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@306414 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mcrypt/functions/mcrypt-cbc.xml | 2 +- reference/mcrypt/functions/mcrypt-cfb.xml | 2 +- .../mcrypt/functions/mcrypt-create-iv.xml | 6 +-- reference/mcrypt/functions/mcrypt-decrypt.xml | 21 ++++---- reference/mcrypt/functions/mcrypt-ecb.xml | 2 +- .../functions/mcrypt-enc-get-iv-size.xml | 2 +- .../mcrypt-enc-get-supported-key-sizes.xml | 4 +- .../functions/mcrypt-enc-is-block-mode.xml | 3 +- reference/mcrypt/functions/mcrypt-encrypt.xml | 20 ++++---- .../mcrypt/functions/mcrypt-generic-init.xml | 2 +- .../functions/mcrypt-get-block-size.xml | 2 +- .../functions/mcrypt-get-cipher-name.xml | 2 +- .../mcrypt/functions/mcrypt-get-iv-size.xml | 14 +++--- .../mcrypt/functions/mcrypt-get-key-size.xml | 48 ++++++++++++------- .../functions/mcrypt-list-algorithms.xml | 8 ++-- .../mcrypt/functions/mcrypt-list-modes.xml | 11 +++-- .../mcrypt/functions/mcrypt-module-close.xml | 2 +- .../mcrypt-module-get-supported-key-sizes.xml | 4 +- .../mcrypt-module-is-block-algorithm-mode.xml | 2 +- .../mcrypt-module-is-block-algorithm.xml | 6 +-- .../functions/mcrypt-module-is-block-mode.xml | 2 +- .../mcrypt/functions/mcrypt-module-open.xml | 23 +++++---- .../functions/mcrypt-module-self-test.xml | 4 +- reference/mcrypt/functions/mcrypt-ofb.xml | 2 +- .../mcrypt/functions/mdecrypt-generic.xml | 8 ++-- 25 files changed, 110 insertions(+), 92 deletions(-) diff --git a/reference/mcrypt/functions/mcrypt-cbc.xml b/reference/mcrypt/functions/mcrypt-cbc.xml index ddd13b0d60..6b13991c13 100644 --- a/reference/mcrypt/functions/mcrypt-cbc.xml +++ b/reference/mcrypt/functions/mcrypt-cbc.xml @@ -3,7 +3,7 @@ mcrypt_cbc - Encrypt/decrypt data in CBC mode + Encrypts/decrypts data in CBC mode diff --git a/reference/mcrypt/functions/mcrypt-cfb.xml b/reference/mcrypt/functions/mcrypt-cfb.xml index 950bfec01c..9c93456ee5 100644 --- a/reference/mcrypt/functions/mcrypt-cfb.xml +++ b/reference/mcrypt/functions/mcrypt-cfb.xml @@ -3,7 +3,7 @@ mcrypt_cfb - Encrypt/decrypt data in CFB mode + Encrypts/decrypts data in CFB mode diff --git a/reference/mcrypt/functions/mcrypt-create-iv.xml b/reference/mcrypt/functions/mcrypt-create-iv.xml index 685d7f03b4..f96e5301c7 100644 --- a/reference/mcrypt/functions/mcrypt-create-iv.xml +++ b/reference/mcrypt/functions/mcrypt-create-iv.xml @@ -3,7 +3,7 @@ mcrypt_create_iv - Create an initialization vector (IV) from a random source + Creates an initialization vector (IV) from a random source @@ -14,7 +14,7 @@ intsourceMCRYPT_DEV_RANDOM - Create an initialization vector (IV) from a random source. + Creates an initialization vector (IV) from a random source. The IV is only meant to give an alternative seed to the encryption @@ -98,7 +98,7 @@ &reftitle.examples; - <function>mcrypt_create_iv</function> example + <function>mcrypt_create_iv</function> Example cipher - cipher is one of the MCRYPT_ciphername constants - of the name of the algorithm as string. + One of the MCRYPT_ciphername constants, + or the name of the algorithm as string. @@ -36,8 +36,8 @@ key - key is the key with which the data was encrypted. - If it's smaller than the required keysize, it is padded with + The key with which the data was encrypted. If it's smaller + than the required keysize, it is padded with '\0'. @@ -46,8 +46,8 @@ data - data is the data that will be decrypted with - the given cipher and mode. If the size of the data is not n * blocksize, + The data that will be decrypted with the given cipher + and mode. If the size of the data is not n * blocksize, the data will be padded with '\0'. @@ -56,8 +56,9 @@ mode - mode is one of the MCRYPT_MODE_modename - constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". + One of the MCRYPT_MODE_modename constants, + or one of the following strings: "ecb", "cbc", "cfb", "ofb", + "nofb" or "stream". @@ -65,10 +66,10 @@ iv - The iv parameter is used for the initialisation + The iv parameter is used for the initialization in CBC, CFB, OFB modes, and in some algorithms in STREAM mode. If you do not supply an IV, while it is needed for an algorithm, the function - issues a warning and uses an IV with all bytes set to + issues a warning and uses an IV with all its bytes set to '\0'. diff --git a/reference/mcrypt/functions/mcrypt-ecb.xml b/reference/mcrypt/functions/mcrypt-ecb.xml index 041652c6d6..2a328ff11e 100644 --- a/reference/mcrypt/functions/mcrypt-ecb.xml +++ b/reference/mcrypt/functions/mcrypt-ecb.xml @@ -3,7 +3,7 @@ mcrypt_ecb - Deprecated: Encrypt/decrypt data in ECB mode + Deprecated: Encrypts/decrypts data in ECB mode diff --git a/reference/mcrypt/functions/mcrypt-enc-get-iv-size.xml b/reference/mcrypt/functions/mcrypt-enc-get-iv-size.xml index 16e4a46294..7205f8ab00 100644 --- a/reference/mcrypt/functions/mcrypt-enc-get-iv-size.xml +++ b/reference/mcrypt/functions/mcrypt-enc-get-iv-size.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - Returns the size of the IV, or 0 if the IV is ignored in the algorithm. + Returns the size of the IV, or 0 if the IV is ignored by the algorithm. diff --git a/reference/mcrypt/functions/mcrypt-enc-get-supported-key-sizes.xml b/reference/mcrypt/functions/mcrypt-enc-get-supported-key-sizes.xml index 0b788484e3..0e18e5a251 100644 --- a/reference/mcrypt/functions/mcrypt-enc-get-supported-key-sizes.xml +++ b/reference/mcrypt/functions/mcrypt-enc-get-supported-key-sizes.xml @@ -57,9 +57,7 @@ ?> ]]> - - This will print: - + &example.outputs; &reftitle.returnvalues; - Returns &true; if the mode outputs blocks of bytes or &false; if it outputs bytes. + Returns &true; if the mode outputs blocks of bytes, + or &false; if it outputs just bytes. diff --git a/reference/mcrypt/functions/mcrypt-encrypt.xml b/reference/mcrypt/functions/mcrypt-encrypt.xml index 31e9119bd7..22d936ca61 100644 --- a/reference/mcrypt/functions/mcrypt-encrypt.xml +++ b/reference/mcrypt/functions/mcrypt-encrypt.xml @@ -29,8 +29,8 @@ cipher - One of the MCRYPT_ciphername - constants of the name of the algorithm as string. + One of the MCRYPT_ciphername + constants, or the name of the algorithm as string. @@ -52,9 +52,9 @@ data - The data that will be encrypted with the given cipher and mode. If the - size of the data is not n * blocksize, the data will be padded with - '\0'. + The data that will be encrypted with the given cipher + and mode. If the size of the data is not n * blocksize, + the data will be padded with '\0'. The returned crypttext can be larger than the size of the data that was @@ -66,9 +66,9 @@ mode - One of the MCRYPT_MODE_modename - constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or - "stream". + One of the MCRYPT_MODE_modename constants, + or one of the following strings: "ecb", "cbc", "cfb", "ofb", + "nofb" or "stream". @@ -76,10 +76,10 @@ iv - Used for the initialisation in CBC, CFB, OFB modes, and in some + Used for the initialization in CBC, CFB, OFB modes, and in some algorithms in STREAM mode. If you do not supply an IV, while it is needed for an algorithm, the function issues a warning and uses an - IV with all bytes set to '\0'. + IV with all its bytes set to '\0'. diff --git a/reference/mcrypt/functions/mcrypt-generic-init.xml b/reference/mcrypt/functions/mcrypt-generic-init.xml index 4a887cd3eb..13c6814952 100644 --- a/reference/mcrypt/functions/mcrypt-generic-init.xml +++ b/reference/mcrypt/functions/mcrypt-generic-init.xml @@ -61,7 +61,7 @@ &reftitle.returnvalues; - The function returns a negative value on error, -3 when the key length + The function returns a negative value on error: -3 when the key length was incorrect, -4 when there was a memory allocation problem and any other return value is an unknown error. If an error occurs a warning will be displayed accordingly. &false; is returned if incorrect parameters diff --git a/reference/mcrypt/functions/mcrypt-get-block-size.xml b/reference/mcrypt/functions/mcrypt-get-block-size.xml index 0ff9c5fced..9ca5f52951 100644 --- a/reference/mcrypt/functions/mcrypt-get-block-size.xml +++ b/reference/mcrypt/functions/mcrypt-get-block-size.xml @@ -3,7 +3,7 @@ mcrypt_get_block_size - Get the block size of the specified cipher + Gets the block size of the specified cipher diff --git a/reference/mcrypt/functions/mcrypt-get-cipher-name.xml b/reference/mcrypt/functions/mcrypt-get-cipher-name.xml index 781d12a137..cfd1b516aa 100644 --- a/reference/mcrypt/functions/mcrypt-get-cipher-name.xml +++ b/reference/mcrypt/functions/mcrypt-get-cipher-name.xml @@ -3,7 +3,7 @@ mcrypt_get_cipher_name - Get the name of the specified cipher + Gets the name of the specified cipher diff --git a/reference/mcrypt/functions/mcrypt-get-iv-size.xml b/reference/mcrypt/functions/mcrypt-get-iv-size.xml index 13351328a2..31cfc948fa 100644 --- a/reference/mcrypt/functions/mcrypt-get-iv-size.xml +++ b/reference/mcrypt/functions/mcrypt-get-iv-size.xml @@ -32,7 +32,7 @@ cipher - One of the MCRYPT_ciphername constants of the name + One of the MCRYPT_ciphername constants, or the name of the algorithm as string. @@ -41,10 +41,10 @@ mode - mode is one of the MCRYPT_MODE_modename constants - or one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". The IV is - ignored in ECB mode as this mode does not require it. You will need to - have the same IV (think: starting point) both at encryption and + One of the MCRYPT_MODE_modename constants, or one of + the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". + The IV is ignored in ECB mode as this mode does not require it. You will + need to have the same IV (think: starting point) both at encryption and decryption stages, otherwise your encryption will fail. @@ -56,7 +56,7 @@ &reftitle.returnvalues; - Returns the size of the Initialisation Vector (IV) in bytes. On error the + Returns the size of the Initialization Vector (IV) in bytes. On error the function returns &false;. If the IV is ignored in the specified cipher/mode combination zero is returned. @@ -66,7 +66,7 @@ &reftitle.examples; - <function>mcrypt_get_iv_size</function> example + <function>mcrypt_get_iv_size</function> Example mcrypt_get_key_size - Get the key size of the specified cipher + Gets the key size of the specified cipher @@ -27,32 +27,46 @@ combination with an encryption mode). - This example shows how to use this function when linked against libmcrypt - 2.4.x and 2.5.x. It is more useful to use the - mcrypt_enc_get_key_size function as this uses the - resource returned by mcrypt_module_open. - + It is more useful to use the mcrypt_enc_get_key_size + function as this uses the resource returned by mcrypt_module_open. + + + + &reftitle.examples; + - <function>mcrypt_get_key_size</function> example + <function>mcrypt_get_key_size</function> Example - -Prints: -24 ]]> - + + The example above shows how to use this function when + linked against libmcrypt 2.4.x or 2.5.x. + + &example.outputs; + + + + - - See also: mcrypt_get_block_size, - mcrypt_enc_get_key_size and - mcrypt_encrypt. - - + + &reftitle.seealso; + + + mcrypt_get_block_size + mcrypt_enc_get_key_size + mcrypt_encrypt + + + +