public function preHash(string $directive = 'script-src', string $hash = '', string $algorithm = 'sha384') : self
{
$ruleKeys = \array_keys($this->policies);
if (\in_array($directive, $ruleKeys)) {
$this->policies[$directive]['hashes'][] = [$algorithm => $hash];
}
return $this;
}