AuroraRuntime/Include/Aurora/Parse/Hex.hpp

26 lines
626 B
C++
Raw Normal View History

2021-09-06 10:58:08 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Hex.hpp
Date: 2021-8-28
Author: Reece
***/
#pragma once
namespace Aurora::Parse
{
enum class EHexDump
{
eString,
eZeroXSpace,
eHexEditor,
eCLiteral,
eJSLiteral
};
AUKN_SYM void ByteToHex(AuUInt8 val, char(&hex)[2]);
AUKN_SYM bool HexToInt (const char *hex, AuUInt32 length, AuUInt64 &val);
AUKN_SYM void EncodeHex(const void *pBuf, AuUInt32 length, EHexDump formatting, AuString &out);
AUKN_SYM bool DecodeHex(const AuString &in, AuList<AuUInt8> &out);
}