src/Security/Encryption.php
protected function isMacValid($data, $bytes)
    {
        $calculated = hash_hmac(
            'sha384', $this->mac($data['iv'], $data['value']), $bytes, true
        );

        return hash_equals(
            hash_hmac('sha384', $data['hash_mac'], $bytes, true), $calculated
        );
    }
protected function isMacValid($data, $bytes)
    {
        $calculated = hash_hmac(
            'sha384', $this->mac($data['iv'], $data['value']), $bytes, true
        );

        return hash_equals(
            hash_hmac('sha384', $data['hash_mac'], $bytes, true), $calculated
        );
    }
protected function isMacValid ( $ data , $ bytes ) { $ calculated = hash_hmac ( 'sha384' , $ this -> mac ( $ data [ 'iv' ] , $ data [ 'value' ] ) , $ bytes , true ) ; return hash_equals ( hash_hmac ( 'sha384' , $ data [ 'hash_mac' ] , $ bytes , true ) , $ calculated ) ; }
Determine if hash is valid.

@param $data
@param $bytes

@return bool
Determine if hash is valid .