| Index: lib/crypto/crypto.dart
|
| diff --git a/lib/crypto/crypto.dart b/lib/crypto/crypto.dart
|
| index f17c0f0e9c9c9d79aae83e3357eca9d592f381ae..d34aeaac9efc4a23a84dfae8096a8dff86a66be0 100644
|
| --- a/lib/crypto/crypto.dart
|
| +++ b/lib/crypto/crypto.dart
|
| @@ -4,6 +4,7 @@
|
|
|
| #library('crypto');
|
|
|
| +#source('crypto_utils.dart');
|
| #source('hmac.dart');
|
| #source('sha_utils.dart');
|
| #source('sha1.dart');
|
| @@ -59,7 +60,6 @@ interface SHA256 extends Hash default _SHA256 {
|
| SHA256();
|
| }
|
|
|
| -
|
| /**
|
| * Hash-based Message Authentication Code support.
|
| *
|
| @@ -84,6 +84,18 @@ interface HMAC default _HMAC {
|
| List<int> digest();
|
| }
|
|
|
| +/**
|
| + * Utility methods for working with message digests.
|
| + */
|
| +class CryptoUtils {
|
| + /**
|
| + * Convert a list of bytes (for example a message digest) into a hex
|
| + * string.
|
| + */
|
| + static String bytesToHex(List<int> bytes) {
|
| + return _CryptoUtils.bytesToHex(bytes);
|
| + }
|
| +}
|
|
|
| /**
|
| * HashExceptions are thrown on invalid use of a Hash
|
|
|