Calculates the MD5 sum of the file file. If the second parameter opt exists and is true, then calculate the MD5 sum of the string str.