MCPcopy
hub / github.com/hardentools/hardentools / Harden

Method Harden

registry_utils.go:184–202  ·  view source on GitHub ↗

--------- RegistryMultiValue ------- Harden function for RegistryMultiValue struct.

(harden bool)

Source from the content-addressed store, hash-verified

182
183// Harden function for RegistryMultiValue struct.
184func (regMultiValue RegistryMultiValue) Harden(harden bool) error {
185 for _, singleDWORD := range regMultiValue.ArraySingleDWORD {
186 err := singleDWORD.Harden(harden)
187 if err != nil {
188 Info.Println("Could not harden " + singleDWORD.Name() +
189 " due to error: " + err.Error())
190 return err
191 }
192 }
193 for _, singleSZ := range regMultiValue.ArraySingleSZ {
194 err := singleSZ.Harden(harden)
195 if err != nil {
196 Info.Println("Could not harden " + singleSZ.Name() +
197 " due to error: " + err.Error())
198 return err
199 }
200 }
201 return nil
202}
203
204// IsHardened verifies if harden object of type RegistryMultiValue is already
205// hardened.

Callers

nothing calls this directly

Calls 2

HardenMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected