Index: sdk/lib/crypto/crypto.dart |
diff --git a/sdk/lib/crypto/crypto.dart b/sdk/lib/crypto/crypto.dart |
index ff634928d102fc2db377eac627e68978c0664820..c8f9a0f5a9e724e5ce7ce4e37fc24b31cd9306ae 100644 |
--- a/sdk/lib/crypto/crypto.dart |
+++ b/sdk/lib/crypto/crypto.dart |
@@ -52,15 +52,15 @@ abstract class Hash { |
/** |
* SHA1 hash function implementation. |
*/ |
-interface SHA1 extends Hash default _SHA1 { |
- SHA1(); |
+abstract class SHA1 implements Hash { |
+ factory SHA1() => new _SHA1(); |
} |
/** |
* SHA256 hash function implementation. |
*/ |
-interface SHA256 extends Hash default _SHA256 { |
- SHA256(); |
+abstract class SHA256 implements Hash { |
+ factory SHA256() => new _SHA256(); |
} |
/** |
@@ -69,8 +69,8 @@ interface SHA256 extends Hash default _SHA256 { |
* WARNING: MD5 has known collisions and should only be used when |
* required for backwards compatibility. |
*/ |
-interface MD5 extends Hash default _MD5 { |
- MD5(); |
+abstract class MD5 implements Hash { |
+ factory MD5() => new _MD5(); |
} |
/** |
@@ -79,11 +79,11 @@ interface MD5 extends Hash default _MD5 { |
* The [update] method is used to add data to the message. The [digest] method |
* is used to extract the message authentication code. |
*/ |
-interface HMAC default _HMAC { |
+abstract class HMAC { |
/** |
* Create an [HMAC] object from a [Hash] and a key. |
*/ |
- HMAC(Hash hash, List<int> key); |
+ factory HMAC(Hash hash, List<int> key) => new _HMAC(); |
/** |
* Add a list of bytes to the message. |
@@ -100,7 +100,7 @@ interface HMAC default _HMAC { |
/** |
* Utility methods for working with message digests. |
*/ |
-class CryptoUtils { |
+abstract class CryptoUtils { |
/** |
* Convert a list of bytes (for example a message digest) into a hex |
* string. |