1/*
2 * Copyright (c) 2024-2024 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
16#ifndef SIGNATRUETOOLS_SIGN_BLOCK_DATA_H
17#define SIGNATRUETOOLS_SIGN_BLOCK_DATA_H
18
19#include <string>
20#include <vector>
21
22#include "file_utils.h"
23
24namespace OHOS {
25namespace SignatureTools {
26class SignBlockData {
27public:
28    SignBlockData(const std::vector<int8_t>& signData, const char type);
29    SignBlockData(const std::string &signFile, const char type);
30
31    char GetType();
32    std::vector<int8_t>& GetBlockHead();
33    void SetBlockHead(const std::vector<int8_t>& blockHead);
34    std::vector<int8_t>& GetSignData();
35    std::string GetSignFile();
36    long GetLen();
37    bool GetByte();
38
39private:
40    char m_type;
41    long m_len;
42    bool m_isByte;
43    std::vector<int8_t> m_blockHead;
44    std::vector<int8_t> m_signData;
45    std::string m_signFile;
46};
47} // namespace SignatureTools
48} // namespace OHOS
49#endif
50