HashValue

final class \TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue

Implements
Stringable, SourceValueInterface

Representation of Content-Security-Policy hash source value see https://www.w3.org/TR/CSP3/#grammardef-hash-source

Table of Contents

Interfaces

Stringable
SourceValueInterface
Interface used for self-contained source value models.

Properties

$type  : HashType
$value  : string

Methods

__construct()  : mixed
__toString()  : string
compile()  : string|null
Compiled representation to be used for Content-Security-Policy HTTP header.
create()  : self
hash()  : self
knows()  : bool
Determines whether a serialized representation is known and can be handled by a specific implementation, (e.g. "string starts with 'hash-proxy-").
parse()  : self
Parses a known serialized representation as object representation.
serialize()  : string|null
Serialized representation to be used for persisting declaration (e.g. in database).

Properties

Methods

__toString()

public __toString() : string

Return values

string

compile()

Compiled representation to be used for Content-Security-Policy HTTP header.

public compile([FrontendInterface|null $cache = null ]) : string|null

Parameters

$cache : FrontendInterface|null = null

Return values

string|null —

null means "not applicable / skip"

knows()

Determines whether a serialized representation is known and can be handled by a specific implementation, (e.g. "string starts with 'hash-proxy-").

public static knows(string $value) : bool

Parameters

$value : string

Return values

bool

parse()

Parses a known serialized representation as object representation.

public static parse(string $value) : self

Parameters

$value : string

Return values

self

serialize()

Serialized representation to be used for persisting declaration (e.g. in database).

public serialize() : string|null

Return values

string|null —

null means "not applicable / skip"

On this page