\OCP\SecurityStringUtils

Class StringUtils

Summary

Methods
Properties
Constants
equals()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

equals()

equals(string  $expected, string  $input) : boolean

Compares whether two strings are equal. To prevent guessing of the string length this is done by comparing two hashes against each other and afterwards a comparison of the real string to prevent against the unlikely chance of collisions.

Parameters

string $expected

The expected value

string $input

The input to compare against

Returns

boolean —

True if the two strings are equal, otherwise false.