private static function getSignatureHash(string $data, string $salt, int $version = 2) : string
    {
        if ($version === 2) {
            return \base64_encode(\sodium_crypto_generichash($data, $salt, 64));
        }

        // Version 1 signature hash should be returned as a fallback
        return \hash('sha256', $data);
    }
private static function getSignatureHash(string $data, string $salt, int $version = 2) : string
    {
        if ($version === 2) {
            return \base64_encode(\sodium_crypto_generichash($data, $salt, 64));
        }

        // Version 1 signature hash should be returned as a fallback
        return \hash('sha256', $data);
    }
private static function getSignatureHash ( string $ data , string $ salt , int $ version = 2 ) : string { if ( $ version === 2 ) { return \ base64_encode ( \ sodium_crypto_generichash ( $ data , $ salt , 64 ) ) ; } // Version 1 signature hash should be returned as a fallback return \ hash ( 'sha256' , $ data ) ; }
Returns the signature hash

@param string  $data
@param string  $salt
@param integer $version
@return string
Returns the signature hash