/*** Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: HMAC.hpp Date: 2022-9-18 Author: Reece ***/ #pragma once namespace Aurora::Crypto::HMAC { struct HMACContext : IHMACContext { HMACContext(AuHashing::EHashType type); void Ingest(const Memory::MemoryViewRead &input) override; Memory::MemoryViewRead Finalize() override; void Reset() override; bool Init(const Memory::MemoryViewRead &input); private: AuUInt8 buffer_[64] {}; hmac_state state_ {}; hmac_state referenceState_ {}; AuHashing::EHashType type_ {}; bool bFinished_ {}; }; }