Plasma Engine  2.0
Loading...
Searching...
No Matches
HashStream.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/IO/Stream.h>
5
9class PL_FOUNDATION_DLL plHashStreamWriter32 : public plStreamWriter
10{
11public:
13 plHashStreamWriter32(plUInt32 uiSeed = 0);
15
17 virtual plResult WriteBytes(const void* pWriteBuffer, plUInt64 uiBytesToWrite) override;
18
21 plUInt32 GetHashValue() const;
22
23private:
24 void* m_pState = nullptr;
25};
26
27
31class PL_FOUNDATION_DLL plHashStreamWriter64 : public plStreamWriter
32{
33public:
35 plHashStreamWriter64(plUInt64 uiSeed = 0);
37
39 virtual plResult WriteBytes(const void* pWriteBuffer, plUInt64 uiBytesToWrite) override;
40
43 plUInt64 GetHashValue() const;
44
45private:
46 void* m_pState = nullptr;
47};
A stream writer that hashes the data written to it.
Definition HashStream.h:10
A stream writer that hashes the data written to it.
Definition HashStream.h:32
Interface for binary out (write) streams.
Definition Stream.h:107
virtual plResult WriteBytes(const void *pWriteBuffer, plUInt64 uiBytesToWrite)=0
Writes a raw number of bytes from the buffer, this is the only method which has to be implemented to ...
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54