Mantid
Loading...
Searching...
No Matches
ChecksumHelper.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "MantidKernel/DllConfig.h"
10#include <string>
11
12namespace Mantid::Kernel {
13
16namespace ChecksumHelper {
17// loads a file, optionally converting line endings
18MANTID_KERNEL_DLL std::string loadFile(const std::string &filepath, const bool unixEOL);
20MANTID_KERNEL_DLL std::string md5FromString(const std::string &input);
22MANTID_KERNEL_DLL std::string sha1FromString(const std::string &input);
24MANTID_KERNEL_DLL std::string sha1FromFile(const std::string &filepath, const bool unixEOL);
26MANTID_KERNEL_DLL std::string gitSha1FromFile(const std::string &filepath);
27} // namespace ChecksumHelper
28
29} // namespace Mantid::Kernel
MANTID_KERNEL_DLL std::string sha1FromString(const std::string &input)
create a SHA-1 checksum from a string
MANTID_KERNEL_DLL std::string gitSha1FromFile(const std::string &filepath)
create a git checksum from a file (these match the git hash-object command)
MANTID_KERNEL_DLL std::string md5FromString(const std::string &input)
create a md5 checksum from a string
MANTID_KERNEL_DLL std::string loadFile(const std::string &filepath, const bool unixEOL)
Load contents of file into a string.
MANTID_KERNEL_DLL std::string sha1FromFile(const std::string &filepath, const bool unixEOL)
create a SHA-1 checksum from a file