It is sometimes possible to add a (either signed or unprotected) 'hash signature' that represents the unencrypted content of the file.
The more secure encryption schemes explicitly use a 'non-deterministic' (actually they endeavour to be 'truly random', not just use a crypto-level PRNG, by collecting entropy through various means) approach, and will never encrypt the same data in the same way twice. 'I have been working on testing whether same encrypted files are same without decrypting it'