MCPcopy Create free account
hub / github.com/D7EAD/mkPIVM / parse_format

Function parse_format

src/main.cpp:749–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747 }
748
749 Format parse_format(const std::string& s) {
750 if (s == "raw") return Format::Raw;
751 if (s == "hex") return Format::Hex;
752 if (s == "c" || s == "cpp" || s == "h") return Format::C;
753 if (s == "py" || s == "python") return Format::Py;
754 if (s == "ps1" || s == "powershell") return Format::Ps1;
755 if (s == "b64" || s == "base64") return Format::B64;
756 if (s == "nasm" || s == "asm") return Format::Nasm;
757 throw mkpivm::Error("unknown --format: " + s + ", expected raw|hex|c|py|ps1|b64|nasm");
758 }
759
760 std::string fmt_hex(const std::vector<std::uint8_t>& v) {
761 std::string s;

Callers 1

mainFunction · 0.85

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected