csp

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package csp computes the Content-Security-Policy hash sources of the inline elements go-partial writes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(text string) string

Hash returns the hash source of an inline <style> or <script> element whose text is text, everything between its start and end tag, exactly as it is written: 'sha256-…', with its quotes, ready for a policy's style-src or script-src directive.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL