Run the following in both directories (change the output filename for the second):
find . -print0 | LC_ALL=C sort -z | xargs -0r md5sum > ../dir1.md5 2>&1
Compare the two resulting text files with eg.
If you're interested only in files (and don't care for potential empty directories), then add
to the arguments of