mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 09:57:50 +08:00
fix(parser): handle raw SeedPGP payloads without prefix
Modifies the frame parsing logic to accommodate Base45-encoded SeedPGP payloads that are missing the 'SEEDPGP1:' prefix and CRC. This scenario occurs with certain QR code generators, such as some modes on Krux devices. - `frameParse` now detects when the prefix is missing and treats the entire input as a raw Base45 payload. - A `rawPayload` flag is added to the `ParsedSeedPgpFrame` type to signal this case. - `frameDecodeToPgpBytes` now bypasses the CRC check when this flag is true, allowing the decryption to proceed. - This resolves a bug where valid encrypted payloads were being rejected due to a missing frame structure.
This commit is contained in:
@@ -11,6 +11,7 @@ export type ParsedSeedPgpFrame = {
|
||||
kind: "single";
|
||||
crc16: string;
|
||||
b45: string;
|
||||
rawPayload?: boolean;
|
||||
};
|
||||
|
||||
// Krux KEF types
|
||||
|
||||
Reference in New Issue
Block a user