Skip to content

Commit ed4b8ca

Browse files
committed
Allow empty HMAC key
1 parent 604fb48 commit ed4b8ca

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

cryptography/lib/src/dart/hmac.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)