calculateMD5SumAsyncWithCrypto static method

Future<String> calculateMD5SumAsyncWithCrypto(
  1. String filePath
)

Implementation

static Future<String> calculateMD5SumAsyncWithCrypto(String filePath) async {
  var ret = '';
  final file = File(filePath);
  if (await file.exists()) {
    ret = hex.encode((await md5.bind(file.openRead()).first).bytes);
  } else {
    debugPrint('`$filePath` does not exits so unable to evaluate its MD5 sum.');
    return '';
  }
  debugPrint('calculateMD5SumAsyncWithCrypto = $ret');
  return ret;
}