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 class
static class
static class
static class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
DSA with SHA2-256 digest.static final int
ECDSA with SHA2-256 digest.static final int
ECDSA with SHA2-512 digest.static final int
RSASSA-PKCS1-v1_5 with SHA2-256 digest.static final int
RSASSA-PKCS1-v1_5 with SHA2-512 digest.static final int
RSASSA-PSS with SHA2-256 digest, SHA2-256 MGF1, 32 bytes of salt, trailer: 0xbc.static final int
RSASSA-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 String
algoIdToString
(int id) Convert a signature/digest algorithm id to a human-readable identifier string.Retrieve the list ofsigner
blocks.protected void
parse
(int available) protected byte[]
readBytes
(int len) protected int
readInt()
protected int
readSize()
protected void
skipAndWarnIfNonZero
(int len) protected void
skipBytes
(int len) toString()
protected void
verifyZero
(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 ofsigner
blocks.- 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)
-