23 lines
987 B
TypeScript
23 lines
987 B
TypeScript
/**
|
|
* Parse Android APK metadata and signing certificate fingerprint.
|
|
* Supports JAR signing (v1) and APK Signature Scheme v2/v3.
|
|
*/
|
|
export type ApkParsedMeta = {
|
|
packageName: string;
|
|
versionName: string;
|
|
versionCode: number;
|
|
signingCertSha256: string | null;
|
|
};
|
|
/** True when file starts with ZIP/APK magic bytes. */
|
|
export declare function assertApkZipMagic(filePath: string): void;
|
|
/**
|
|
* Read signing cert from APK Signature Scheme v2/v3 using only a file tail (no full APK load).
|
|
*/
|
|
export declare function extractSigningCertSha256FromApkSigningBlock(filePath: string): string | null;
|
|
/**
|
|
* Extract SHA-256 of the first signing certificate (APK v2/v3 first, then JAR v1).
|
|
*/
|
|
export declare function extractSigningCertSha256(filePath: string): string | null;
|
|
/** Parse packageName / versionCode / versionName and signing cert fingerprint. */
|
|
export declare function parseApkFile(filePath: string): Promise<ApkParsedMeta>;
|
|
//# sourceMappingURL=apkParser.d.ts.map
|