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

Unified Diff: lib/src/utils.dart

Issue 1907023002: Respond to feedback in https://codereview.chromium.org/1902993003/. (Closed) Base URL: https://github.com/dart-lang/pub.git@master
Patch Set: 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 | « no previous file | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 9683223b008a9b452c16aea02bee5a6b2b4ef478..8436ff8f5ac1103b5e12499f997471a905794537 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -8,7 +8,6 @@ import "dart:convert";
import 'dart:io';
import 'dart:math' as math;
-import "package:convert/convert.dart";
import "package:crypto/crypto.dart" as crypto;
import 'package:path/path.dart' as path;
import "package:stack_trace/stack_trace.dart";
@@ -488,7 +487,7 @@ bool endsWithPattern(String str, Pattern matcher) {
/// Returns the hex-encoded sha1 hash of [source].
String sha1(String source) =>
- hex.encode(crypto.sha1.convert(source.codeUnits).bytes);
+ crypto.sha1.convert(UTF8.encode(source)).toString();
/// Returns the base64-encoded sha1 hash of [stream].
Future<String> sha1Stream(Stream<List<int>> stream) async {
« no previous file with comments | « no previous file | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698