hash.stub.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /** @generate-class-entries */
  3. /** @refcount 1 */
  4. function hash(string $algo, string $data, bool $binary = false, array $options = []): string {}
  5. /** @refcount 1 */
  6. function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
  7. /** @refcount 1 */
  8. function hash_hmac(string $algo, string $data, string $key, bool $binary = false): string {}
  9. /** @refcount 1 */
  10. function hash_hmac_file(string $algo, string $filename, string $key, bool $binary = false): string|false {}
  11. /** @refcount 1 */
  12. function hash_init(string $algo, int $flags = 0, string $key = "", array $options = []): HashContext {}
  13. function hash_update(HashContext $context, string $data): bool {}
  14. /** @param resource $stream */
  15. function hash_update_stream(HashContext $context, $stream, int $length = -1): int {}
  16. /** @param resource|null $stream_context */
  17. function hash_update_file(HashContext $context, string $filename, $stream_context = null): bool {}
  18. /** @refcount 1 */
  19. function hash_final(HashContext $context, bool $binary = false): string {}
  20. /** @refcount 1 */
  21. function hash_copy(HashContext $context): HashContext {}
  22. /**
  23. * @return array<int, string>
  24. * @refcount 1
  25. */
  26. function hash_algos(): array {}
  27. /**
  28. * @return array<int, string>
  29. * @refcount 1
  30. */
  31. function hash_hmac_algos(): array {}
  32. /** @refcount 1 */
  33. function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {}
  34. function hash_equals(string $known_string, string $user_string): bool {}
  35. /** @refcount 1 */
  36. function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string {}
  37. #ifdef PHP_MHASH_BC
  38. /** @deprecated */
  39. function mhash_get_block_size(int $algo): int|false {}
  40. /**
  41. * @refcount 1
  42. * @deprecated
  43. */
  44. function mhash_get_hash_name(int $algo): string|false {}
  45. /**
  46. * @refcount 1
  47. * @deprecated
  48. */
  49. function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {}
  50. /** @deprecated */
  51. function mhash_count(): int {}
  52. /**
  53. * @refcount 1
  54. * @deprecated
  55. */
  56. function mhash(int $algo, string $data, ?string $key = null): string|false {}
  57. #endif
  58. final class HashContext
  59. {
  60. private function __construct() {}
  61. public function __serialize(): array {}
  62. public function __unserialize(array $data): void {}
  63. }