Skip to content

Ant-tree/Signature-Finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Signature-Finder

Finds latest signature schemes from APK file

Core sources are located here

Supports Jar signer & Apk signature scheme 2 & 3

Usage

Simply call findCertSignature and it returns ArrayList of SignatureScheme

String apkPath;

...

ArrayList<SignatureScheme> signatureSchemes = findCertSignature(apkPath);

for(SignatureScheme scheme : signatureSchemes) {
    // 1 for jar signer signature, 2 & 3 for APK signature scheme
    int version = scheme.getSchemeVersion();
    
    // For scheme 2 & 3 : Whole Signature block data.
    // For jar signer (scheme v.1), this returns first RSA | DSA | EC data (alphabetic order)
    byte[] sigBlockData = scheme.getSigBlockData();
    
    // Below is ASN1 encoded format of certificate
    // Convert it into X.509 using CertificateFactory if needed.
    byte[] certificate = scheme.getFirstCertificateData(); 
    ...
}

About

Finds latest signature schemes from APK file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages