From f2113063f67465e008540367ff8430ad0666f003 Mon Sep 17 00:00:00 2001 From: chenqun1 Date: Thu, 24 Feb 2022 11:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hap=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E9=AD=94=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenqun1 --- .../main/java/com/ohos/hapsigntool/hap/sign/SignHapV2.java | 2 +- .../src/main/java/com/ohos/hapsigntool/utils/HapUtils.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/SignHapV2.java b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/SignHapV2.java index 90a2ebc6..9644ab27 100644 --- a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/SignHapV2.java +++ b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/SignHapV2.java @@ -46,7 +46,7 @@ import java.util.jar.JarOutputStream; * @since 2021/12/21 */ public abstract class SignHapV2 { - private static final int HAP_SIGN_SCHEME_VERSION = 2; + private static final int HAP_SIGN_SCHEME_VERSION = 3; private static final int STORED_ENTRY_SO_ALIGNMENT = 4096; private SignHapV2() {} diff --git a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/HapUtils.java b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/HapUtils.java index dc7fb4a6..4a2bfd75 100644 --- a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/HapUtils.java +++ b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/HapUtils.java @@ -94,17 +94,17 @@ public class HapUtils { * Magic word of hap signature block/ */ private static final byte[] HAP_SIGNING_BLOCK_MAGIC = - new byte[] {0x48, 0x41, 0x50, 0x20, 0x53, 0x69, 0x67, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x34, 0x32}; + new byte[] {0x3c, 0x68, 0x61, 0x70, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3e}; /** * The value of lower 8 bytes of magic word */ - public static final long HAP_SIG_BLOCK_MAGIC_LO = 0x2067695320504148L; + public static final long HAP_SIG_BLOCK_MAGIC_LO = 0x676973207061683cL; /** * The value of higher 8 bytes of magic word */ - public static final long HAP_SIG_BLOCK_MAGIC_HI = 0x3234206b636f6c42L; + public static final long HAP_SIG_BLOCK_MAGIC_HI = 0x3e6b636f6c62206eL; /** * Size of hap signature block header -- Gitee