1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef OHOS_HDI_HASH_H 10 #define OHOS_HDI_HASH_H 11 12 #include <string> 13 #include <vector> 14 15 #include "preprocessor/preprocessor.h" 16 17 namespace OHOS { 18 namespace HDI { 19 class Hash { 20 public: 21 static bool GenHashKey(); 22 23 private: 24 static bool FormatStdout(const FileDetailMap &fileDetails); 25 26 static bool FormatFile(const FileDetailMap &fileDetails, const std::string &filePath); 27 28 static std::vector<std::string> GetHashInfo(const FileDetailMap &fileDetails); 29 30 static bool GenFileHashKey(const std::string &path, size_t &hashKey); 31 }; 32 } // namespace HDI 33 } // namespace OHOS 34 35 #endif // OHOS_HDI_HASH_H