sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1
5// //////////////////////////////////////////////////////////
6// hash.h
7// Copyright (c) 2014,2015 Stephan Brumme. All rights reserved.
8// see http://create.stephan-brumme.com/disclaimer.html
9//
10
11#pragma once
12
13#include <string>
14
16class Hash
17{
18public:
20 virtual std::string operator()(const void* data, size_t numBytes) = 0;
22 virtual std::string operator()(const std::string& text) = 0;
23
25 virtual void add(const void* data, size_t numBytes) = 0;
26
28 virtual std::string getHash() = 0;
29
31 virtual void reset() = 0;
32};
abstract base class
Definition hash.h:17
virtual void reset()=0
restart
virtual void add(const void *data, size_t numBytes)=0
add arbitrary number of bytes
virtual std::string operator()(const void *data, size_t numBytes)=0
compute hash of a memory block
virtual std::string operator()(const std::string &text)=0
compute hash of a string, excluding final zero
virtual std::string getHash()=0
return latest hash as hex characters