mirror of
https://github.com/facebook/sapling.git
synced 2024-10-04 22:07:44 +03:00
c663f1d624
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
28 lines
598 B
C++
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
|