File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed
Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,6 @@ class BrowserHmac extends Hmac {
6666
6767 Future <web_crypto.CryptoKey > _jsCryptoKey (SecretKey secretKey) async {
6868 final secretKeyBytes = await secretKey.extractBytes ();
69- if (secretKeyBytes.isEmpty) {
70- throw ArgumentError .value (
71- secretKey,
72- 'secretKey' ,
73- 'SecretKey bytes must be non-empty' ,
74- );
75- }
7669 return await web_crypto.importKeyWhenRaw (
7770 web_crypto.jsUint8ListFrom (secretKeyBytes),
7871 web_crypto.HmacImportParams (
Original file line number Diff line number Diff line change @@ -120,13 +120,6 @@ class _DartHmacSink extends MacSink with DartMacSinkMixin {
120120 'AAD is not supported by HMAC' ,
121121 );
122122 }
123- if (secretKey.bytes.isEmpty) {
124- throw ArgumentError .value (
125- secretKey,
126- 'secretKey' ,
127- 'Secret key must be non-empty' ,
128- );
129- }
130123 _isClosed = false ;
131124 var hmacKey = secretKey.bytes;
132125 var eraseKey = false ;
You can’t perform that action at this time.
0 commit comments