PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/plugins/com.aptana.editor.php.epl/Resources/language/php5.3/hash.php

https://github.com/haegyung/aptana-php
PHP | 190 lines | 14 code | 14 blank | 162 comment | 0 complexity | 89b619b0e4f8e3bb1e3f70a326f3e1f6 MD5 | raw file
  1. <?php
  2. // Start of hash v.1.0
  3. /**
  4. * Generate a hash value (message digest)
  5. * @link http://www.php.net/manual/en/function.hash.php
  6. * @param algo string <p>
  7. * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..)
  8. * </p>
  9. * @param data string <p>
  10. * Message to be hashed.
  11. * </p>
  12. * @param raw_output bool[optional] <p>
  13. * When set to true, outputs raw binary data.
  14. * false outputs lowercase hexits.
  15. * </p>
  16. * @return string a string containing the calculated message digest as lowercase hexits
  17. * unless raw_output is set to true in which case the raw
  18. * binary representation of the message digest is returned.
  19. */
  20. function hash ($algo, $data, $raw_output = null) {}
  21. /**
  22. * Generate a hash value using the contents of a given file
  23. * @link http://www.php.net/manual/en/function.hash-file.php
  24. * @param algo string <p>
  25. * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..)
  26. * </p>
  27. * @param filename string <p>
  28. * URL describing location of file to be hashed; Supports fopen wrappers.
  29. * </p>
  30. * @param raw_output bool[optional] <p>
  31. * When set to true, outputs raw binary data.
  32. * false outputs lowercase hexits.
  33. * </p>
  34. * @return string a string containing the calculated message digest as lowercase hexits
  35. * unless raw_output is set to true in which case the raw
  36. * binary representation of the message digest is returned.
  37. */
  38. function hash_file ($algo, $filename, $raw_output = null) {}
  39. /**
  40. * Generate a keyed hash value using the HMAC method
  41. * @link http://www.php.net/manual/en/function.hash-hmac.php
  42. * @param algo string <p>
  43. * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
  44. * </p>
  45. * @param data string <p>
  46. * Message to be hashed.
  47. * </p>
  48. * @param key string <p>
  49. * Shared secret key used for generating the HMAC variant of the message digest.
  50. * </p>
  51. * @param raw_output bool[optional] <p>
  52. * When set to true, outputs raw binary data.
  53. * false outputs lowercase hexits.
  54. * </p>
  55. * @return string a string containing the calculated message digest as lowercase hexits
  56. * unless raw_output is set to true in which case the raw
  57. * binary representation of the message digest is returned.
  58. */
  59. function hash_hmac ($algo, $data, $key, $raw_output = null) {}
  60. /**
  61. * Generate a keyed hash value using the HMAC method and the contents of a given file
  62. * @link http://www.php.net/manual/en/function.hash-hmac-file.php
  63. * @param algo string <p>
  64. * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
  65. * </p>
  66. * @param filename string <p>
  67. * URL describing location of file to be hashed; Supports fopen wrappers.
  68. * </p>
  69. * @param key string <p>
  70. * Shared secret key used for generating the HMAC variant of the message digest.
  71. * </p>
  72. * @param raw_output bool[optional] <p>
  73. * When set to true, outputs raw binary data.
  74. * false outputs lowercase hexits.
  75. * </p>
  76. * @return string a string containing the calculated message digest as lowercase hexits
  77. * unless raw_output is set to true in which case the raw
  78. * binary representation of the message digest is returned.
  79. */
  80. function hash_hmac_file ($algo, $filename, $key, $raw_output = null) {}
  81. /**
  82. * Initialize an incremental hashing context
  83. * @link http://www.php.net/manual/en/function.hash-init.php
  84. * @param algo string <p>
  85. * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..)
  86. * </p>
  87. * @param options int[optional] <p>
  88. * Optional settings for hash generation, currently supports only one option:
  89. * HASH_HMAC. When specified, the key
  90. * must be specified.
  91. * </p>
  92. * @param key string[optional] <p>
  93. * When HASH_HMAC is specified for options,
  94. * a shared secret key to be used with the HMAC hashing method must be supplied in this
  95. * parameter.
  96. * </p>
  97. * @return resource a Hashing Context resource for use with hash_update,
  98. * hash_update_stream, hash_update_file,
  99. * and hash_final.
  100. */
  101. function hash_init ($algo, $options = null, $key = null) {}
  102. /**
  103. * Pump data into an active hashing context
  104. * @link http://www.php.net/manual/en/function.hash-update.php
  105. * @param context resource <p>
  106. * Hashing context returned by hash_init.
  107. * </p>
  108. * @param data string <p>
  109. * Message to be included in the hash digest.
  110. * </p>
  111. * @return bool true.
  112. */
  113. function hash_update ($context, $data) {}
  114. /**
  115. * Pump data into an active hashing context from an open stream
  116. * @link http://www.php.net/manual/en/function.hash-update-stream.php
  117. * @param context resource <p>
  118. * Hashing context returned by hash_init.
  119. * </p>
  120. * @param handle resource <p>
  121. * Open file handle as returned by any stream creation function.
  122. * </p>
  123. * @param length int[optional] <p>
  124. * Maximum number of characters to copy from handle
  125. * into the hashing context.
  126. * </p>
  127. * @return int Actual number of bytes added to the hashing context from handle.
  128. */
  129. function hash_update_stream ($context, $handle, $length = null) {}
  130. /**
  131. * Pump data into an active hashing context from a file
  132. * @link http://www.php.net/manual/en/function.hash-update-file.php
  133. * @param context resource <p>
  134. * Stream context as returned by stream_context_create.
  135. * </p>
  136. * @param filename string <p>
  137. * URL describing location of file to be hashed; Supports fopen wrappers.
  138. * </p>
  139. * @param context resource[optional]
  140. * @return bool Returns true on success or false on failure.
  141. */
  142. function hash_update_file ($context, $filename, $context = null) {}
  143. /**
  144. * Finalize an incremental hash and return resulting digest
  145. * @link http://www.php.net/manual/en/function.hash-final.php
  146. * @param context resource <p>
  147. * Hashing context returned by hash_init.
  148. * </p>
  149. * @param raw_output bool[optional] <p>
  150. * When set to true, outputs raw binary data.
  151. * false outputs lowercase hexits.
  152. * </p>
  153. * @return string a string containing the calculated message digest as lowercase hexits
  154. * unless raw_output is set to true in which case the raw
  155. * binary representation of the message digest is returned.
  156. */
  157. function hash_final ($context, $raw_output = null) {}
  158. /**
  159. * Copy hashing context
  160. * @link http://www.php.net/manual/en/function.hash-copy.php
  161. * @param context resource <p>
  162. * Hashing context returned by hash_init.
  163. * </p>
  164. * @return resource a copy of Hashing Context resource.
  165. */
  166. function hash_copy ($context) {}
  167. /**
  168. * Return a list of registered hashing algorithms
  169. * @link http://www.php.net/manual/en/function.hash-algos.php
  170. * @return array a numerically indexed array containing the list of supported
  171. * hashing algorithms.
  172. */
  173. function hash_algos () {}
  174. define ('HASH_HMAC', 1);
  175. // End of hash v.1.0
  176. ?>