1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef oSHA256_HEADER
- #define oSHA256_HEADER
- #include <cstring>
- #include "../classes/stdafx.hpp"
- #define oSHA256_LEFT_SIZE 2
- #define oSHA256_HASH_SIZE 256/32
- #define oSHA256_BUFFER_LENGTH 256/4
- #define oSHA256_DIGEST_LENGTH 256/8
- typedef unsigned char byte;
- class __declspec (dllexport) oSHA256
- {
- public:
- oSHA256 ();
- ~ oSHA256 ();
- static unsigned DigestLength;
- oSHA256 & Reset (void);
- oSHA256 & Write (void const * memory, size_t length);
- oSHA256 & Fetch (byte digest []);
- private:
- oSHA256 & Block (const byte buffer []);
- uint32_t * mcount;
- uint32_t * mstate;
- uint8_t * mblock;
- uint8_t * mextra;
- };
- #endif
|