JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "ComponentChecksumManager.php"

Full Path: /var/www/lionsclub/core/vendor/livewire/livewire/src/ComponentChecksumManager.php
File size: 762 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Livewire;

class ComponentChecksumManager
{
    public function generate($fingerprint, $memo)
    {
        $hashKey = app('encrypter')->getKey();

        // It's actually Ok if the "children" tracking is tampered with.
        // Also, this way JavaScript can modify children as it needs to for
        // dom-diffing purposes.
        $memoSansChildren = array_diff_key($memo, array_flip(['children']));

        $stringForHashing = ''
            .json_encode($fingerprint)
            .json_encode($memoSansChildren);

        return hash_hmac('sha256', $stringForHashing, $hashKey);
    }

    public function check($checksum, $fingerprint, $memo)
    {
        return hash_equals($this->generate($fingerprint, $memo), $checksum);
    }
}