[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
1 changed files with 7 additions and 0 deletions

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;