Documentation

Security
in package
Uses Singleton

A class that handles provides various security related functions.

Table of Contents

ALGORITHM  = 'sha256'
$instance  : object
The only instance of using class
getinstance()  : object
Checks, instantiates and returns the only instance of the using class.
hash()  : string
Hash a string
makeNonce()  : string
Make a nonce value for including inline CSS
mimetype()  : string
Get mimetype for a file

Constants

ALGORITHM

private mixed ALGORITHM = 'sha256'

Properties

$instance

The only instance of using class

protected static object $instance = NULL

Methods

getinstance()

Checks, instantiates and returns the only instance of the using class.

public static getinstance() : object
Tags
template

object

psalm-return

object

psalm-suppress

MismatchingDocblockReturnType

psalm-suppress

ReservedWord

Return values
object

hash()

Hash a string

public hash(string $data) : string
Parameters
$data : string
Return values
string

makeNonce()

Make a nonce value for including inline CSS

public makeNonce() : string
Return values
string

mimetype()

Get mimetype for a file

public mimetype(string $path) : string
Parameters
$path : string

The path to the file

Return values
string

Search results