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:
parent
83447975ac
commit
f3a23ab81f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user