Documentation

SRI
in package

Ensure Sub-Ressource Integrity

Table of Contents

Methods

createSRI()  : string
Input a ressource file with Sub-Ressource Integrity
hashSRI()  : string
Create a hash on a ressource file with sha384 hash algorithm

Methods

createSRI()

Input a ressource file with Sub-Ressource Integrity

public static createSRI(string $InputType, string $FileDirection) : string
Parameters
$InputType : string

CSS or JS, else, it return an error

$FileDirection : string

File path

Return values
string

return the whole ressource input (you can see on web dev tools on your browser)

hashSRI()

Create a hash on a ressource file with sha384 hash algorithm

public static hashSRI(string $FileContent) : string
Parameters
$FileContent : string

File path

Return values
string

        
On this page

Search results