1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[util] Add convenience method for SHA1 hash compulation

This commit is contained in:
Philip Rebohle 2018-09-21 23:24:17 +02:00
parent 83447975ac
commit f3a23ab81f
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -36,6 +36,13 @@ namespace dxvk {
const uint8_t* data,
size_t size);
template<typename T>
static Sha1Hash compute(const T& data) {
auto bytes = reinterpret_cast<const uint8_t*>(&data);
return compute(bytes, sizeof(T));
}
private:
Sha1Digest m_digest;