mirror of https://github.com/doitsujin/dxvk
[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…
Reference in New Issue