VECTO Input Manager
Loading...
Searching...
No Matches
VectoInputManager.Core.XmlUtils Class Reference

Provides utilities for XML serialization, hashing, and validation of VECTO vehicle declarations and components. Handles signature generation using VECTO hashing algorithms. More...

Static Public Member Functions

static void HashAndSerializeJob (Stream output, IVehicleJobDeclaration vectoInputDeclaration)
 Hashes and serializes a complete vehicle job declaration to XML format. Computes cryptographic signatures for each component before serialization.
static void HashAndSerializeJobEx (Stream output, IVehicleJobDeclaration vectoInputDeclaration, ILogger? logger, IEnumerable<(string path, ISignatureType sig)> sigOverrides)
static void HashAndSerialize (Stream output, VectoInputDeclaration_v2_2 vectoInputDeclaration, BaseInput? input)
 Hashes and serializes a single component declaration to XML format. Optionally embeds input data as an XML comment.
static IList<(string path, SignatureValidation result)> ValidateVehicleJobHashes (IVehicleJobDeclaration job)
 Validates the cryptographic hashes of all components in a vehicle job declaration.
static SignatureValidation ValidateComponentHashes (IComponentDeclaration component)
 Validates the cryptographic hash of the component.

Detailed Description

Provides utilities for XML serialization, hashing, and validation of VECTO vehicle declarations and components. Handles signature generation using VECTO hashing algorithms.

Member Function Documentation

◆ HashAndSerialize()

void VectoInputManager.Core.XmlUtils.HashAndSerialize ( Stream output,
VectoInputDeclaration_v2_2 vectoInputDeclaration,
BaseInput? input )
inlinestatic

Hashes and serializes a single component declaration to XML format. Optionally embeds input data as an XML comment.

Parameters
outputThe output stream to write the serialized XML to.
vectoInputDeclarationThe component declaration container.
inputOptional input data to embed as a comment.

◆ HashAndSerializeJob()

void VectoInputManager.Core.XmlUtils.HashAndSerializeJob ( Stream output,
IVehicleJobDeclaration vectoInputDeclaration )
inlinestatic

Hashes and serializes a complete vehicle job declaration to XML format. Computes cryptographic signatures for each component before serialization.

Parameters
outputThe output stream to write the serialized XML to.
vectoInputDeclarationThe vehicle job declaration to serialize.

◆ ValidateComponentHashes()

SignatureValidation VectoInputManager.Core.XmlUtils.ValidateComponentHashes ( IComponentDeclaration component)
inlinestatic

Validates the cryptographic hash of the component.

Parameters
componentThe component to validate.
Returns
A ValidationResult indicating whether the hash is valid or the type of error encountered.

◆ ValidateVehicleJobHashes()

IList<(string path, SignatureValidation result)> VectoInputManager.Core.XmlUtils.ValidateVehicleJobHashes ( IVehicleJobDeclaration job)
inlinestatic

Validates the cryptographic hashes of all components in a vehicle job declaration.

Parameters
jobThe vehicle job declaration to validate.
Returns
A list of component paths with their validation results.

The documentation for this class was generated from the following file:
  • VectoInputManagerCore/XmlUtils.cs