Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: pkg/analyzer/lib/src/summary/summarize_elements.dart

Issue 1890973003: pkg/analyzer: support latest pkg/crypto version (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: nits Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/incremental_cache.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index bb2a42e23ed15e295a5a8c27fd074bf42cdb80a1..74e10f018a96b214834ecb576ec3c1d33874a773 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -19,6 +19,7 @@ import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/name_filter.dart';
import 'package:analyzer/src/summary/summarize_const_expr.dart';
+import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';
import 'package:path/path.dart' as path;
@@ -212,9 +213,7 @@ class PackageBundleAssembler {
* Compute a hash of the given file contents.
*/
String _hash(String contents) {
- MD5 md5 = new MD5();
- md5.add(UTF8.encode(contents));
- return CryptoUtils.bytesToHex(md5.close());
+ return hex.encode(md5.convert(UTF8.encode(contents)).bytes);
}
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/incremental_cache.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698