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