Policy

1. Overview

The Policy.cpp file implements canonical string conversion for RootGuard policy mode and action enumerations.

The file integrates the following components, APIs, or runtime concepts:

  • Policy.hpp – enum declarations

2. Mode Conversion

toString(Mode) returns enforce for Mode::Enforce and audit otherwise.


3. Action Conversion

toString(Action) returns block for Action::Block and audit otherwise.


4. Usage

These lowercase values are used by runtime status files, policy summaries, and other diagnostic output so policy state has one consistent textual representation.


5. Runtime and Security Considerations

  • Noexcept helpers: conversion cannot fail and performs no allocation internally beyond the caller’s later use of the returned literal.