parseapk/parse_apk.py
def parse_digest(data, offset):
    '''parses a length prefixed digest (inside APK Signature Scheme v2 Block)
    '''
    length = struct.unpack("<L", data[offset: offset+4])[0]
    print "\t\t\t\t\tLength of digest struct: ", length

    algoid = struct.unpack("<L", data[offset+4: offset+8])[0]
    print "\t\t\t\t\tDigest algo id         : %s" % (str_algo_id(algoid))

    digest_len = struct.unpack("<L", data[offset+8: offset+12])[0]
    print "\t\t\t\t\tDigest length          : ", digest_len

    digest = data[offset+12:offset+12+digest_len]
    print "\t\t\t\t\tDigest: ", digest.encode('hex')
    
    return 12+digest_len
parses a length prefixed digest (inside APK Signature Scheme v2 Block)
    
parses a length prefixed digest (inside APK Signature Scheme v2 Block)
parses a length prefixed digest ( inside APK Signature Scheme v2 Block )
def parse_digest(data, offset):
    length = struct.unpack("<L", data[offset: offset+4])[0]
    print "\t\t\t\t\tLength of digest struct: ", length
    algoid = struct.unpack("<L", data[offset+4: offset+8])[0]
    print "\t\t\t\t\tDigest algo id         : %s" % (str_algo_id(algoid))
    digest_len = struct.unpack("<L", data[offset+8: offset+12])[0]
    print "\t\t\t\t\tDigest length          : ", digest_len
    digest = data[offset+12:offset+12+digest_len]
    print "\t\t\t\t\tDigest: ", digest.encode('hex')
    return 12+digest_len
def parse_digest ( data , offset ) : length = struct . unpack ( "<L" , data [ offset : offset + 4 ] ) [ 0 ] print "\t\t\t\t\tLength of digest struct: " , length algoid = struct . unpack ( "<L" , data [ offset + 4 : offset + 8 ] ) [ 0 ] print "\t\t\t\t\tDigest algo id         : %s" % ( str_algo_id ( algoid ) ) digest_len = struct . unpack ( "<L" , data [ offset + 8 : offset + 12 ] ) [ 0 ] print "\t\t\t\t\tDigest length          : " , digest_len digest = data [ offset + 12 : offset + 12 + digest_len ] print "\t\t\t\t\tDigest: " , digest . encode ( 'hex' ) return 12 + digest_len
parses a length prefixed digest (inside APK Signature Scheme v2 Block)
parses a length prefixed digest ( inside APK Signature Scheme v2 Block )
'''parses a length prefixed digest (inside APK Signature Scheme v2 Block)
    '''
data
offset