diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 54bd9d8f2..720ba46e1 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -334,6 +334,22 @@ function fclose(&$stream) : bool { } +/** + * @psalm-pure + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) + */ +function sodium_bin2base64(string $string, int $id): string + +/** + * @psalm-pure + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) + */ +function sodium_bin2hex(string $string): string {} + /** * @param string $string * @param-out null $string @@ -1308,9 +1324,21 @@ function base64_decode(string $string, bool $strict = false) {} * @psalm-pure * * @psalm-flow ($string) -> return + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) */ function base64_encode(string $string) : string {} +/** + * @psalm-pure + * + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) + */ +function bin2hex(string $string): string {} + /** * @psalm-pure *