func DigestManifest(manifest []byte, hash crypto.Hash, sectionsOnly, apkV2 bool) ([]byte, error)
Transform a MANIFEST.MF into a *.SF by digesting each section with the specified hash
type FilesMap struct { Main http.Header Order []string Files map[string]http.Header }
func ParseManifest(manifest []byte) (files *FilesMap, err error)
func (m *FilesMap) Dump() []byte
type JarDigest struct { Digests map[string]string Manifest []byte Hash crypto.Hash // contains filtered or unexported fields }
func DigestJarStream(r io.Reader, hash crypto.Hash) (*JarDigest, error)
func (jd *JarDigest) Sign(ctx context.Context, cert *certloader.Certificate, alias string, sectionsOnly, inlineSignature, apkV2 bool) (*binpatch.PatchSet, *pkcs9.TimestampedSignature, error)
type JarSignature struct { pkcs9.TimestampedSignature SignatureHeader http.Header Hash crypto.Hash }
func Verify(inz *zip.Reader, skipDigests bool) ([]*JarSignature, error)