r script for doing comparison of digest