2020-06-07 15:19:35 +00:00
|
|
|
#pragma once
|
|
|
|
#include "progress_callback.h"
|
|
|
|
#include "types.h"
|
|
|
|
#include <array>
|
2021-10-23 14:56:54 +00:00
|
|
|
#include <optional>
|
2020-06-07 15:19:35 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class CDImage;
|
|
|
|
|
|
|
|
namespace CDImageHasher {
|
|
|
|
|
|
|
|
using Hash = std::array<u8, 16>;
|
|
|
|
std::string HashToString(const Hash& hash);
|
2021-10-23 14:56:54 +00:00
|
|
|
std::optional<Hash> HashFromString(const std::string_view& str);
|
2020-06-07 15:19:35 +00:00
|
|
|
|
|
|
|
bool GetImageHash(CDImage* image, Hash* out_hash,
|
|
|
|
ProgressCallback* progress_callback = ProgressCallback::NullProgressCallback);
|
|
|
|
bool GetTrackHash(CDImage* image, u8 track, Hash* out_hash,
|
|
|
|
ProgressCallback* progress_callback = ProgressCallback::NullProgressCallback);
|
|
|
|
|
|
|
|
} // namespace CDImageHasher
|