hash_equals( string $a, string $b )

Compare two strings in constant time.


Description Description

This function was added in PHP 5.6. It can leak the length of a string.


Parameters Parameters

$a

(Required) Expected string.

$b

(Required) Actual string.


Top ↑

Return Return

(bool) Whether strings are equal.


Top ↑

Source Source

File: includes/misc-functions.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.