3 * Automatically generated by running "php schema.php mcrypt".
5 * You may modify the file, but re-running schema.php against this file will
6 * standardize the format without losing your schema changes. It does lose
7 * any changes that are not part of schema. Use "note" field to comment on
8 * schema itself, and "note" fields are not used in any code generation but
9 * only staying within this file.
11 ///////////////////////////////////////////////////////////////////////////////
12 // Preamble: C++ code inserted at beginning of ext_{name}.h
19 ///////////////////////////////////////////////////////////////////////////////
23 // 'name' => name of the constant
24 // 'type' => type of the constant
25 // 'note' => additional note about this constant's schema
29 ///////////////////////////////////////////////////////////////////////////////
33 // 'name' => name of the function
34 // 'desc' => description of the function's purpose
35 // 'flags' => attributes of the function, see base.php for possible values
36 // 'opt' => optimization callback function's name for compiler
37 // 'note' => additional note about this function's schema
40 // 'type' => return type, use Reference for ref return
41 // 'desc' => description of the return value
43 // 'args' => arguments
45 // 'name' => name of the argument
46 // 'type' => type of the argument, use Reference for output parameter
47 // 'value' => default value of the argument
48 // 'desc' => description of the argument
54 'name' => "mcrypt_module_open",
55 'desc' => "This function opens the module of the algorithm and the mode to be used. The name of the algorithm is specified in algorithm, e.g. \"twofish\" or is one of the MCRYPT_ciphername constants. The module is closed by calling mcrypt_module_close().",
56 'flags' => HasDocComment
,
59 'desc' => "Normally it returns an encryption descriptor, or FALSE on error.",
63 'name' => "algorithm",
65 'desc' => "The algorithm to be used.",
68 'name' => "algorithm_directory",
70 'desc' => "The algorithm_directory and mode_directory are used to locate the encryption modules. When you supply a directory name, it is used. When you set one of these to the empty string (\"\"), the value set by the mcrypt.algorithms_dir or mcrypt.modes_dir ini-directive is used. When these are not set, the default directories that are used are the ones that were compiled in into libmcrypt (usually /usr/local/lib/libmcrypt).",
75 'desc' => "The mode to be used.",
78 'name' => "mode_directory",
82 'taint_observer' => false,
87 'name' => "mcrypt_module_close",
88 'desc' => "Closes the specified encryption handle.",
89 'flags' => HasDocComment
,
92 'desc' => "Returns TRUE on success or FALSE on failure.",
98 'desc' => "The encryption descriptor.",
101 'taint_observer' => false,
106 'name' => "mcrypt_list_algorithms",
107 'desc' => "Gets the list of all supported algorithms in the lib_dir parameter.",
108 'flags' => HasDocComment
,
111 'desc' => "Returns an array with all the supported algorithms.",
117 'value' => "null_string",
118 'desc' => "Specifies the directory where all algorithms are located. If not specifies, the value of the mcrypt.algorithms_dir php.ini directive is used.",
121 'taint_observer' => false,
126 'name' => "mcrypt_list_modes",
127 'desc' => "Gets the list of all supported modes in the lib_dir parameter.",
128 'flags' => HasDocComment
,
131 'desc' => "Returns an array with all the supported modes.",
137 'value' => "null_string",
138 'desc' => "Specifies the directory where all modes are located. If not specifies, the value of the mcrypt.modes_dir php.ini directive is used.",
141 'taint_observer' => false,
146 'name' => "mcrypt_module_get_algo_block_size",
147 'desc' => "Gets the blocksize of the specified algorithm.",
148 'flags' => HasDocComment
,
151 'desc' => "Returns the block size of the algorithm specified in bytes.",
155 'name' => "algorithm",
157 'desc' => "The algorithm name.",
162 'value' => "null_string",
163 'desc' => "This optional parameter can contain the location where the mode module is on the system.",
166 'taint_observer' => false,
171 'name' => "mcrypt_module_get_algo_key_size",
172 'desc' => "Gets the maximum supported keysize of the opened mode.",
173 'flags' => HasDocComment
,
176 'desc' => "This function returns the maximum supported key size of the algorithm specified in bytes.",
180 'name' => "algorithm",
182 'desc' => "The algorithm name.",
187 'value' => "null_string",
188 'desc' => "This optional parameter can contain the location where the mode module is on the system.",
191 'taint_observer' => false,
196 'name' => "mcrypt_module_get_supported_key_sizes",
197 'desc' => "Returns an array with the key sizes supported by the specified algorithm. If it returns an empty array then all key sizes between 1 and mcrypt_module_get_algo_key_size() are supported by the algorithm.",
198 'flags' => HasDocComment
,
201 'desc' => "Returns an array with the key sizes supported by the specified algorithm. If it returns an empty array then all key sizes between 1 and mcrypt_module_get_algo_key_size() are supported by the algorithm.",
205 'name' => "algorithm",
207 'desc' => "The algorithm to used.",
212 'value' => "null_string",
213 'desc' => "The optional lib_dir parameter can contain the location of where the algorithm module is on the system.",
216 'taint_observer' => false,
221 'name' => "mcrypt_module_is_block_algorithm_mode",
222 'desc' => "This function returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE. (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb).",
223 'flags' => HasDocComment
,
226 'desc' => "This function returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE. (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb).",
232 'desc' => "The mode to check.",
237 'value' => "null_string",
238 'desc' => "The optional lib_dir parameter can contain the location of where the algorithm module is on the system.",
241 'taint_observer' => false,
246 'name' => "mcrypt_module_is_block_algorithm",
247 'desc' => "This function returns TRUE if the specified algorithm is a block algorithm, or FALSE is it is a stream algorithm.",
248 'flags' => HasDocComment
,
251 'desc' => "This function returns TRUE if the specified algorithm is a block algorithm, or FALSE is it is a stream algorithm.",
255 'name' => "algorithm",
257 'desc' => "The algorithm to check.",
262 'value' => "null_string",
263 'desc' => "The optional lib_dir parameter can contain the location of where the algorithm module is on the system.",
266 'taint_observer' => false,
271 'name' => "mcrypt_module_is_block_mode",
272 'desc' => "This function returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs just bytes. (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream).",
273 'flags' => HasDocComment
,
276 'desc' => "This function returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs just bytes. (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream).",
282 'desc' => "The mode to check.",
287 'value' => "null_string",
288 'desc' => "The optional lib_dir parameter can contain the location of where the algorithm module is on the system.",
291 'taint_observer' => false,
296 'name' => "mcrypt_module_self_test",
297 'desc' => "This function runs the self test on the algorithm specified.",
298 'flags' => HasDocComment
,
301 'desc' => "The function returns TRUE if the self test succeeds, or FALSE when if fails.",
305 'name' => "algorithm",
307 'desc' => "The algorithm to test.",
312 'value' => "null_string",
313 'desc' => "The optional lib_dir parameter can contain the location of where the algorithm module is on the system.",
316 'taint_observer' => false,
321 'name' => "mcrypt_create_iv",
322 'desc' => "Create an initialization vector (IV) from a random source.\n\nThe IV is only meant to give an alternative seed to the encryption routines. This IV does not need to be secret at all, though it can be desirable. You even can send it along with your ciphertext without losing security.",
323 'flags' => HasDocComment
,
326 'desc' => "Returns the initialization vector, or FALSE on error.",
332 'desc' => "Determines the size of the IV, parameter source (defaults to random value) specifies the source of the IV.",
338 'desc' => "The source can be MCRYPT_RAND (system random number generator), MCRYPT_DEV_RANDOM (read data from /dev/random) and MCRYPT_DEV_URANDOM (read data from /dev/urandom). Prior to 5.3.0, MCRYPT_RAND was the only one supported on Windows.",
341 'taint_observer' => false,
346 'name' => "mcrypt_encrypt",
347 'desc' => "Encrypts the data and returns it.",
348 'flags' => HasDocComment
,
351 'desc' => "Returns the encrypted data, as a string.",
357 'desc' => "One of the MCRYPT_ciphername constants of the name of the algorithm as string.",
362 'desc' => "The key with which the data will be encrypted. If it's smaller that the required keysize, it is padded with '\\0'. It is better not to use ASCII strings for keys.\n\nIt is recommended to use the mhash functions to create a key from a string.",
367 'desc' => "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'.\n\nThe returned crypttext can be larger that the size of the data that is given by data.",
372 'desc' => "One of the MCRYPT_MODE_modename constants of one of \"ecb\", \"cbc\", \"cfb\", \"ofb\", \"nofb\" or \"stream\".",
377 'value' => "null_string",
378 'desc' => "Used for the initialisation 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'.",
381 'taint_observer' => array(
382 'set_mask' => "TAINT_BIT_MUTATED",
383 'clear_mask' => "TAINT_BIT_NONE",
389 'name' => "mcrypt_decrypt",
390 'desc' => "Decrypts the data and returns the unencrypted data.",
391 'flags' => HasDocComment
,
394 'desc' => "Returns the decrypted data as a string.",
400 'desc' => "cipher is one of the MCRYPT_ciphername constants of the name of the algorithm as string.",
405 'desc' => "key is the key with which the data is encrypted. If it's smaller that the required keysize, it is padded with '\\0'.",
410 'desc' => "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 will be padded with '\\0'.",
415 'desc' => "mode is one of the MCRYPT_MODE_modename constants of one of \"ecb\", \"cbc\", \"cfb\", \"ofb\", \"nofb\" or \"stream\".",
420 'value' => "null_string",
421 'desc' => "The iv parameter is used for the initialisation 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'.",
424 'taint_observer' => array(
425 'set_mask' => "TAINT_BIT_MUTATED",
426 'clear_mask' => "TAINT_BIT_NONE",
432 'name' => "mcrypt_cbc",
433 'flags' => HasDocComment
,
457 'value' => "null_string",
460 'taint_observer' => array(
461 'set_mask' => "TAINT_BIT_MUTATED",
462 'clear_mask' => "TAINT_BIT_NONE",
468 'name' => "mcrypt_cfb",
469 'flags' => HasDocComment
,
493 'value' => "null_string",
496 'taint_observer' => array(
497 'set_mask' => "TAINT_BIT_MUTATED",
498 'clear_mask' => "TAINT_BIT_NONE",
504 'name' => "mcrypt_ecb",
505 'flags' => HasDocComment
,
529 'value' => "null_string",
532 'taint_observer' => array(
533 'set_mask' => "TAINT_BIT_MUTATED",
534 'clear_mask' => "TAINT_BIT_NONE",
540 'name' => "mcrypt_ofb",
541 'flags' => HasDocComment
,
565 'value' => "null_string",
568 'taint_observer' => array(
569 'set_mask' => "TAINT_BIT_MUTATED",
570 'clear_mask' => "TAINT_BIT_NONE",
576 'name' => "mcrypt_get_block_size",
577 'desc' => "The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or 2.5.x.\n\nmcrypt_get_block_size() is used to get the size of a block of the specified cipher (in combination with an encryption mode).\n\nIt is more useful to use the mcrypt_enc_get_block_size() function as this uses the resource returned by mcrypt_module_open().",
578 'flags' => HasDocComment
,
581 'desc' => "Gets the block size, as an integer.",
587 'desc' => "One of the MCRYPT_ciphername constants or the name of the algorithm as string.",
592 'value' => "null_string",
593 'desc' => "The module.",
596 'taint_observer' => false,
601 'name' => "mcrypt_get_cipher_name",
602 'desc' => "mcrypt_get_cipher_name() is used to get the name of the specified cipher.\n\nmcrypt_get_cipher_name() takes the cipher number as an argument (libmcrypt 2.2.x) or takes the cipher name as an argument (libmcrypt 2.4.x or higher) and returns the name of the cipher or FALSE, if the cipher does not exist.",
603 'flags' => HasDocComment
,
606 'desc' => "This function returns the name of the cipher or FALSE, if the cipher does not exist.",
612 'desc' => "One of the MCRYPT_ciphername constants or the name of the algorithm as string.",
615 'taint_observer' => false,
620 'name' => "mcrypt_get_iv_size",
621 'desc' => "Gets the size of the IV belonging to a specific cipher/mode combination.\n\nIt is more useful to use the mcrypt_enc_get_iv_size() function as this uses the resource returned by mcrypt_module_open().",
622 'flags' => HasDocComment
,
625 'desc' => "Returns the size of the Initialisation Vector (IV) in bytes. On error the function returns FALSE. If the IV is ignored in the specified cipher/mode combination zero is returned.",
631 'desc' => "One of the MCRYPT_ciphername constants of the name of the algorithm as string.",
636 'desc' => "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 decryption stages, otherwise your encryption will fail.",
639 'taint_observer' => false,
644 'name' => "mcrypt_get_key_size",
645 'flags' => HasDocComment
,
659 'taint_observer' => false,
664 'name' => "mcrypt_enc_get_algorithms_name",
665 'desc' => "This function returns the name of the algorithm.",
666 'flags' => HasDocComment
,
669 'desc' => "Returns the name of the opened algorithm as a string.",
675 'desc' => "The encryption descriptor.",
678 'taint_observer' => false,
683 'name' => "mcrypt_enc_get_block_size",
684 'desc' => "Gets the blocksize of the opened algorithm.",
685 'flags' => HasDocComment
,
688 'desc' => "Returns the block size of the specified algorithm in bytes.",
694 'desc' => "The encryption descriptor.",
697 'taint_observer' => false,
702 'name' => "mcrypt_enc_get_iv_size",
703 'desc' => "This function returns the size of the IV of the algorithm specified by the encryption descriptor in bytes. An IV is used in cbc, cfb and ofb modes, and in some algorithms in stream mode.",
704 'flags' => HasDocComment
,
707 'desc' => "Returns the size of the IV, or 0 if the IV is ignored in the algorithm.",
713 'desc' => "The encryption descriptor.",
716 'taint_observer' => false,
721 'name' => "mcrypt_enc_get_key_size",
722 'desc' => "Gets the maximum supported key size of the algorithm in bytes.",
723 'flags' => HasDocComment
,
726 'desc' => "Returns the maximum supported key size of the algorithm in bytes.",
732 'desc' => "The encryption descriptor.",
735 'taint_observer' => false,
740 'name' => "mcrypt_enc_get_modes_name",
741 'desc' => "This function returns the name of the mode.",
742 'flags' => HasDocComment
,
745 'desc' => "Returns the name as a string.",
751 'desc' => "The encryption descriptor.",
754 'taint_observer' => false,
759 'name' => "mcrypt_enc_get_supported_key_sizes",
760 'desc' => "Gets the supported key sizes of the opened algorithm.",
761 'flags' => HasDocComment
,
764 'desc' => "Returns an array with the key sizes supported by the algorithm specified by the encryption descriptor. If it returns an empty array then all key sizes between 1 and mcrypt_enc_get_key_size() are supported by the algorithm.",
770 'desc' => "The encryption descriptor.",
773 'taint_observer' => false,
778 'name' => "mcrypt_enc_is_block_algorithm_mode",
779 'desc' => "Tells whether the algorithm of the opened mode works on blocks (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb)..",
780 'flags' => HasDocComment
,
783 'desc' => "Returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE.",
789 'desc' => "The encryption descriptor.",
792 'taint_observer' => false,
797 'name' => "mcrypt_enc_is_block_algorithm",
798 'desc' => "Tells whether the algorithm of the opened mode is a block algorithm.",
799 'flags' => HasDocComment
,
802 'desc' => "Returns TRUE if the algorithm is a block algorithm or FALSE if it is a stream one.",
808 'desc' => "The encryption descriptor.",
811 'taint_observer' => false,
816 'name' => "mcrypt_enc_is_block_mode",
817 'desc' => "Tells whether the opened mode outputs blocks (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream).",
818 'flags' => HasDocComment
,
821 'desc' => "Returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs bytes.",
827 'desc' => "The encryption descriptor.",
830 'taint_observer' => false,
835 'name' => "mcrypt_enc_self_test",
836 'desc' => "This function runs the self test on the algorithm specified by the descriptor td.",
837 'flags' => HasDocComment
,
840 'desc' => "If the self test succeeds it returns FALSE. In case of an error, it returns TRUE.",
846 'desc' => "The encryption descriptor.",
849 'taint_observer' => false,
854 'name' => "mcrypt_generic",
855 'desc' => "This function encrypts data. The data is padded with \"\\0\" to make sure the length of the data is n * blocksize. This function returns the encrypted data. Note that the length of the returned string can in fact be longer then the input, due to the padding of the data.\n\nIf you want to store the encrypted data in a database make sure to store the entire string as returned by mcrypt_generic, or the string will not entirely decrypt properly. If your original string is 10 characters long and the block size is 8 (use mcrypt_enc_get_block_size() to determine the blocksize), you would need at least 16 characters in your database field. Note the string returned by mdecrypt_generic() will be 16 characters as well...use rtrim(\$str, \"\\0\") to remove the padding.\n\nIf you are for example storing the data in a MySQL database remember that varchar fields automatically have trailing spaces removed during insertion. As encrypted data can end in a space (ASCII 32), the data will be damaged by this removal. Store data in a tinyblob/tinytext (or larger) field instead.",
856 'flags' => HasDocComment
,
859 'desc' => "Returns the encrypted data.",
865 'desc' => "The encryption descriptor.\n\nThe encryption handle should always be initialized with mcrypt_generic_init() with a key and an IV before calling this function. Where the encryption is done, you should free the encryption buffers by calling mcrypt_generic_deinit(). See mcrypt_module_open() for an example.",
870 'desc' => "The data to encrypt.",
873 'taint_observer' => array(
874 'set_mask' => "TAINT_BIT_MUTATED",
875 'clear_mask' => "TAINT_BIT_NONE",
881 'name' => "mcrypt_generic_init",
882 'desc' => "You need to call this function before every call to mcrypt_generic() or mdecrypt_generic().",
883 'flags' => HasDocComment
,
886 'desc' => "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 were passed.",
892 'desc' => "The encryption descriptor.",
897 'desc' => "The maximum length of the key should be the one obtained by calling mcrypt_enc_get_key_size() and every value smaller than this is legal.",
902 'desc' => "The IV should normally have the size of the algorithms block size, but you must obtain the size by calling mcrypt_enc_get_iv_size(). IV is ignored in ECB. IV MUST exist in CFB, CBC, STREAM, nOFB and OFB modes. It needs to be random and unique (but not secret). The same IV must be used for encryption/decryption. If you do not want to use it you should set it to zeros, but this is not recommended.",
905 'taint_observer' => false,
910 'name' => "mdecrypt_generic",
911 'desc' => "This function decrypts data. Note that the length of the returned string can in fact be longer then the unencrypted string, due to the padding of the data.",
912 'flags' => HasDocComment
,
920 'desc' => "An encryption descriptor returned by mcrypt_module_open()",
925 'desc' => "Encrypted data.",
928 'taint_observer' => array(
929 'set_mask' => "TAINT_BIT_MUTATED",
930 'clear_mask' => "TAINT_BIT_NONE",
936 'name' => "mcrypt_generic_deinit",
937 'desc' => "This function terminates encryption specified by the encryption descriptor (td). It clears all buffers, but does not close the module. You need to call mcrypt_module_close() yourself. (But PHP does this for you at the end of the script.)",
938 'flags' => HasDocComment
,
941 'desc' => "Returns TRUE on success or FALSE on failure.",
947 'desc' => "The encryption descriptor.",
950 'taint_observer' => false,
955 'name' => "mcrypt_generic_end",
956 'flags' => HasDocComment
,
966 'taint_observer' => false,
970 ///////////////////////////////////////////////////////////////////////////////
975 // 'name' => name of the class
976 // 'desc' => description of the class's purpose
977 // 'flags' => attributes of the class, see base.php for possible values
978 // 'note' => additional note about this class's schema
979 // 'parent' => parent class name, if any
980 // 'ifaces' => array of interfaces tihs class implements
981 // 'bases' => extra internal and special base classes this class requires
982 // 'footer' => extra C++ inserted at end of class declaration
985 // DefineConstant(..)
986 // DefineConstant(..)
988 // DefineFunction(..)
989 // DefineFunction(..)
995 // 'name' => name of the property
996 // 'type' => type of the property
997 // 'flags' => attributes of the property
998 // 'desc' => description of the property
999 // 'note' => additional note about this property's schema