1 /* 2 * Copyright (c) 2025-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef SIGNATURETOOLS_PARAM_CONSTANTS_H 16 #define SIGNATURETOOLS_PARAM_CONSTANTS_H 17 #include <string> 18 19 namespace OHOS { 20 namespace SignatureTools { 21 class ParamConstants { 22 public: 23 const static int HAP_FORMAT_ERROR = 20001; 24 const static int HAP_PARSE_ERROR = 20002; 25 const static int HAP_SIGNATURE_ERROR = 20003; 26 const static int HAP_SIGNATURE_NOT_FOUND_ERROR = 20004; 27 static const std::string HAP_SIG_SCHEME_V256_DIGEST_ALGORITHM; 28 static const std::string HAP_SIG_SCHEME_V384_DIGEST_ALGORITHM; 29 static const std::string HAP_SIG_SCHEME_V512_DIGEST_ALGORITHM; 30 static const std::string HAP_SIG_ALGORITHM_SHA256_ECDSA; 31 static const std::string HAP_SIG_ALGORITHM_SHA384_ECDSA; 32 static const std::string HAP_SIG_ALGORITHM_SHA512_ECDSA; 33 static const std::string ALIGNMENT; 34 static const std::string PARAM_SIGN_MODE; 35 static const std::string PARAM_BASIC_CRL; 36 static const std::string PARAM_BASIC_PROPERTY; 37 static const std::string PARAM_BASIC_PROFILE; 38 static const std::string PARAM_PROFILE_JSON_CONTENT; 39 static const std::string PARAM_BASIC_PROOF; 40 static const std::string PARAM_BASIC_ALIGNMENT; 41 static const std::string PARAM_BASIC_PRIVATE_KEY; 42 static const std::string PARAM_BASIC_INPUT_FILE; 43 static const std::string PARAM_BASIC_OUTPUT_FILE; 44 static const std::string PARAM_BASIC_SIGANTURE_ALG; 45 static const std::string PARAM_BASIC_PROFILE_SIGNED; 46 static const std::string PARAM_BASIC_COMPATIBLE_VERSION; 47 static const std::string PARAM_REMOTE_SERVER; 48 static const std::string PARAM_REMOTE_USERNAME; 49 static const std::string PARAM_REMOTE_USERPWD; 50 static const std::string PARAM_REMOTE_CODE; 51 static const std::string PARAM_REMOTE_ONLINEAUTHMODE; 52 static const std::string PARAM_REMOTE_SIGNERPLUGIN; 53 static const std::string PARAM_LOCAL_JKS_KEYSTORE; 54 static const std::string PARAM_LOCAL_JKS_KEYSTORE_CODE; 55 static const std::string PARAM_LOCAL_JKS_KEYALIAS_CODE; 56 static const std::string PARAM_LOCAL_PUBLIC_CERT; 57 static const std::string PARAM_VERIFY_CERTCHAIN_FILE; 58 static const std::string PARAM_VERIFY_PROFILE_FILE; 59 static const std::string PARAM_VERIFY_PROOF_FILE; 60 static const std::string PARAM_VERIFY_PROPERTY_FILE; 61 static const std::string PARAM_RESIGN_CONFIG_FILE; 62 static const std::string PARAM_IN_FORM; 63 static const std::string PARAM_SIGN_CODE; 64 static const std::string PARAM_SELF_SIGN; 65 static const std::string PARAM_MODULE_FILE; 66 static constexpr int FILE_NAME_MIN_LENGTH = 2; 67 static const std::string DISABLE_SIGN_CODE; 68 static const std::string ENABLE_SIGN_CODE; 69 static const std::string SELF_SIGN_TYPE_0; 70 static const std::string SELF_SIGN_TYPE_1; 71 }; 72 } // namespace SignatureTools 73 } // namespace OHOS 74 #endif // SIGNATURETOOLS_PARAM_CONSTANTS_H 75