sapling/eden/fs/utils/FileHash.h
Barys Skarabahaty c663f1d624 Add blake3 support to FileHash utils
Summary: Adding blake3 support to the FileHash util that is used to compute hashes on Windows.

Reviewed By: chadaustin

Differential Revision: D46268714

fbshipit-source-id: cdca3dced494b1f37841121df09351acfdd6c745
2023-06-05 23:41:35 -07:00

28 lines
598 B
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include <optional>
#include "eden/fs/model/Hash.h"
#include "eden/fs/utils/PathFuncs.h"
namespace facebook::eden {
#ifdef _WIN32
/** Compute the sha1 of the file */
Hash20 getFileSha1(AbsolutePathPiece filePath);
/** Compute the blake3 of the file */
Hash32 getFileBlake3(
AbsolutePathPiece filePath,
const std::optional<std::string>& maybeBlake3Key);
#endif
} // namespace facebook::eden