We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 39a9426 + 62c61ce commit d28e823Copy full SHA for d28e823
1 file changed
lib/secure_storage.dart
@@ -112,6 +112,11 @@ class VersionError implements Exception {
112
String errMsg() => 'Bad version';
113
}
114
115
+/// Padding flag is invalid
116
+class InvalidPadding implements Exception {
117
+ String errMsg() => 'Padding flag is invalid';
118
+}
119
+
120
///
121
/// StorageCryptoHandler
122
@@ -279,7 +284,7 @@ class StorageCryptoHandler {
279
284
280
285
// The padding flag is invalid, which should never happen
281
286
if (paddedValue[0] != 0x01) {
282
- throw BadDecryption();
287
+ throw InvalidPadding();
283
288
289
290
// Extract the value length
0 commit comments