56 public static function parseMessage(
string $message,
int &$counter) : ?string{
57 $delimiterPos = strrpos($message, self::TOKEN_DELIMITER);
58 if($delimiterPos !==
false){
59 $left = substr($message, 0, $delimiterPos);
60 $right = substr($message, $delimiterPos + strlen(self::TOKEN_DELIMITER));
61 $expectedToken = hash(self::TOKEN_HASH_ALGO, $left, options: [
'seed' => $counter]);
63 if($expectedToken === $right){