| Index: utils/pub/utils.dart
|
| diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
|
| index 60f8ab09749a5303189b2d875dacc48554ed7633..6aef021573c852584606209f93fd363105431079 100644
|
| --- a/utils/pub/utils.dart
|
| +++ b/utils/pub/utils.dart
|
| @@ -7,6 +7,8 @@
|
| */
|
| #library('utils');
|
|
|
| +#import('dart:crypto');
|
| +
|
| /** Thrown by methods that parse text when the text isn't a valid. */
|
| class FormatException implements Exception {
|
| final String message;
|
| @@ -110,3 +112,9 @@ bool endsWithPattern(String str, Pattern matcher) {
|
| }
|
| return false;
|
| }
|
| +
|
| +/**
|
| + * Returns the hex-encoded sha1 hash of [source].
|
| + */
|
| +String sha1(String source) =>
|
| + CryptoUtils.bytesToHex(new SHA1().update(source.charCodes()).digest());
|
|
|