feat: implement web service

Signed-off-by: The one with the braid <info@braid.business>
This commit is contained in:
The one with the braid 2023-11-26 19:42:29 +01:00
parent 44494eaa90
commit 6e7f19a764
26 changed files with 331 additions and 512 deletions

30
lib/pkpass/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',
);
}