A method, implemented by at least one apparatus, for comparing a first dataset and a second dataset, in particular with a view for determining whether these two datasets are identical. The method not requiring the presence of these two datasets in the apparatus, and including the following steps of: a) mixing a number, called the mixer number, with the first dataset, using a mixing function, in order to obtain mixed data, b) hashing the mixed data using a hash function, and c) comparing the hash thus obtained in step b) with a third dataset assumed to be the hash of the second dataset mixed with the same mixer number as that used in step a) and with the same mixing function.