File: hash.stub.php

package info (click to toggle)
php8.4 8.4.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 211,276 kB
  • sloc: ansic: 1,176,142; php: 35,419; sh: 11,964; cpp: 7,208; pascal: 4,951; javascript: 3,091; asm: 2,817; yacc: 2,411; makefile: 696; xml: 446; python: 301; awk: 148
file content (107 lines) | stat: -rw-r--r-- 2,786 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php

/** @generate-class-entries */

/**
 * @var int
 * @cvalue PHP_HASH_HMAC
 */
const HASH_HMAC = UNKNOWN;

/** @refcount 1 */
function hash(string $algo, string $data, bool $binary = false, array $options = []): string {}

/** @refcount 1 */
function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}

/**
 * @refcount 1
 */
function hash_hmac(string $algo, string $data, #[\SensitiveParameter] string $key, bool $binary = false): string {}

/**
 * @refcount 1
 */
function hash_hmac_file(string $algo, string $filename, #[\SensitiveParameter] string $key, bool $binary = false): string|false {}

/**
 * @refcount 1
 */
function hash_init(string $algo, int $flags = 0, #[\SensitiveParameter] string $key = "", array $options = []): HashContext {}

function hash_update(HashContext $context, string $data): true {}

/** @param resource $stream */
function hash_update_stream(HashContext $context, $stream, int $length = -1): int {}

/** @param resource|null $stream_context */
function hash_update_file(HashContext $context, string $filename, $stream_context = null): bool {}

/** @refcount 1 */
function hash_final(HashContext $context, bool $binary = false): string {}

/** @refcount 1 */
function hash_copy(HashContext $context): HashContext {}

/**
 * @return array<int, string>
 * @compile-time-eval
 * @refcount 1
 */
function hash_algos(): array {}

/**
 * @return array<int, string>
 * @compile-time-eval
 * @refcount 1
 */
function hash_hmac_algos(): array {}

/**
 * @refcount 1
 */
function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iterations, int $length = 0, bool $binary = false, array $options = []): string {}

function hash_equals(#[\SensitiveParameter] string $known_string, #[\SensitiveParameter] string $user_string): bool {}

/**
 * @refcount 1
 */
function hash_hkdf(string $algo, #[\SensitiveParameter] string $key, int $length = 0, string $info = "", string $salt = ""): string {}

#ifdef PHP_MHASH_BC
#[\Deprecated(since: '8.1')]
function mhash_get_block_size(int $algo): int|false {}

/**
 * @refcount 1
 */
#[\Deprecated(since: '8.1')]
function mhash_get_hash_name(int $algo): string|false {}

/**
 * @refcount 1
 */
#[\Deprecated(since: '8.1')]
function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {}

#[\Deprecated(since: '8.1')]
function mhash_count(): int {}

/**
 * @refcount 1
 */
#[\Deprecated(since: '8.1')]
function mhash(int $algo, string $data, ?string $key = null): string|false {}
#endif

final class HashContext
{
    private function __construct() {}

    public function __serialize(): array {}

    public function __unserialize(array $data): void {}

    public function __debugInfo(): array {}
}