chore: initial commit

Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
This commit is contained in:
The one with the braid 2023-08-26 23:05:51 +02:00
commit cf9609d699
20 changed files with 1483 additions and 0 deletions

30
lib/src/error.dart Normal file
View file

@ -0,0 +1,30 @@
abstract class PKPassError extends Error {
final String message;
PKPassError({required this.message});
@override
String toString() => 'PKPassError: $message';
}
class InvalidEncodingError extends PKPassError {
InvalidEncodingError() : super(message: 'Input not in ZIP format.');
}
class ManifestNotFoundError extends PKPassError {
ManifestNotFoundError()
: super(message: 'No manifest.json found in PKPass archive.');
}
class ManifestChecksumError extends PKPassError {
final String expected;
final String actual;
ManifestChecksumError({
required this.expected,
required this.actual,
}) : super(
message:
'Manifest sha1 checksum missmatch, expected $expected, actual $actual',
);
}