Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions cryptography/lib/src/browser/hmac.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ class BrowserHmac extends Hmac {

Future<web_crypto.CryptoKey> _jsCryptoKey(SecretKey secretKey) async {
final secretKeyBytes = await secretKey.extractBytes();
if (secretKeyBytes.isEmpty) {
throw ArgumentError.value(
secretKey,
'secretKey',
'SecretKey bytes must be non-empty',
);
}
return await web_crypto.importKeyWhenRaw(
web_crypto.jsUint8ListFrom(secretKeyBytes),
web_crypto.HmacImportParams(
Expand Down
7 changes: 0 additions & 7 deletions cryptography/lib/src/dart/hmac.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ class _DartHmacSink extends MacSink with DartMacSinkMixin {
'AAD is not supported by HMAC',
);
}
if (secretKey.bytes.isEmpty) {
throw ArgumentError.value(
secretKey,
'secretKey',
'Secret key must be non-empty',
);
}
_isClosed = false;
var hmacKey = secretKey.bytes;
var eraseKey = false;
Expand Down
Loading