Class APKSigSchemeV2Block
java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.APKSigSchemeV2Block
- Direct Known Subclasses:
APKSigSchemeV3Block
This class represents an
APK Signature Scheme v2 Block.
Reference: https://source.android.com/docs/security/features/apksigning/v2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDSA with SHA2-256 digest.static final intECDSA with SHA2-256 digest.static final intECDSA with SHA2-512 digest.static final intRSASSA-PKCS1-v1_5 with SHA2-256 digest.static final intRSASSA-PKCS1-v1_5 with SHA2-512 digest.static final intRSASSA-PSS with SHA2-256 digest, SHA2-256 MGF1, 32 bytes of salt, trailer: 0xbc.static final intRSASSA-PSS with SHA2-512 digest, SHA2-512 MGF1, 64 bytes of salt, trailer: 0xbc. -
Constructor Summary
ConstructorsConstructorDescriptionCreate and parse a byte buffer containing the raw data of a signature scheme v2 block. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringalgoIdToString(int id) Convert a signature/digest algorithm id to a human-readable identifier string.Retrieve the list ofsignerblocks.protected voidparse(int available) protected byte[]readBytes(int len) protected intreadInt()protected intreadSize()protected voidskipAndWarnIfNonZero(int len) protected voidskipBytes(int len) toString()protected voidverifyZero(int len)
-
Field Details
-
SigAlgoId_RSASSA_PSS_SHA2_256
public static final int SigAlgoId_RSASSA_PSS_SHA2_256RSASSA-PSS with SHA2-256 digest, SHA2-256 MGF1, 32 bytes of salt, trailer: 0xbc.- See Also:
-
SigAlgoId_RSASSA_PSS_SHA2_512
public static final int SigAlgoId_RSASSA_PSS_SHA2_512RSASSA-PSS with SHA2-512 digest, SHA2-512 MGF1, 64 bytes of salt, trailer: 0xbc.- See Also:
-
SigAlgoId_RSASSA_PKCS1_v1_5_SHA2_256
public static final int SigAlgoId_RSASSA_PKCS1_v1_5_SHA2_256RSASSA-PKCS1-v1_5 with SHA2-256 digest. This is for build systems which require deterministic signatures.- See Also:
-
SigAlgoId_RSASSA_PKCS1_v1_5_SHA2_512
public static final int SigAlgoId_RSASSA_PKCS1_v1_5_SHA2_512RSASSA-PKCS1-v1_5 with SHA2-512 digest. This is for build systems which require deterministic signatures.- See Also:
-
SigAlgoId_ECDSA_SHA2_256
public static final int SigAlgoId_ECDSA_SHA2_256ECDSA with SHA2-256 digest.- See Also:
-
SigAlgoId_ECDSA_SHA2_512
public static final int SigAlgoId_ECDSA_SHA2_512ECDSA with SHA2-512 digest.- See Also:
-
SigAlgoId_DSA_SHA2_256
public static final int SigAlgoId_DSA_SHA2_256DSA with SHA2-256 digest.- See Also:
-
-
Constructor Details
-
APKSigSchemeV2Block
Create and parse a byte buffer containing the raw data of a signature scheme v2 block.- Parameters:
b-
-
-
Method Details
-
algoIdToString
Convert a signature/digest algorithm id to a human-readable identifier string.- Parameters:
id- one ofSigAlgoId_Xxx.- Returns:
-
getSigners
Retrieve the list ofsignerblocks.- Returns:
-
toString
-
parse
protected void parse(int available) -
readSize
protected int readSize() -
readInt
protected int readInt() -
readBytes
protected byte[] readBytes(int len) -
skipBytes
protected void skipBytes(int len) -
verifyZero
protected void verifyZero(int len) -
skipAndWarnIfNonZero
protected void skipAndWarnIfNonZero(int len)
-