mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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,
|
const uint8_t* data,
|
||||||
size_t size);
|
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:
|
private:
|
||||||
|
|
||||||
Sha1Digest m_digest;
|
Sha1Digest m_digest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user