AuroraRuntime/Include/Aurora/Parse/Hex.hpp
2021-09-06 11:58:08 +01:00

26 lines
626 B
C++

/***
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);
}