# handlebars-csp-hash

> Handlebars helper for generating Content-Security-Policy hash values

Latest version **0.1.0** (published 2019-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install handlebars-csp-hash
pnpm add handlebars-csp-hash
yarn add handlebars-csp-hash
bun add handlebars-csp-hash
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-10-03 |
| First published | 2019-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mike Hall |
| Maintainers | mikehall314 |
| Keywords | handlebars, csp, content security policy, hash, sha256, sha384, sha512 |

## Links

- npm: https://www.npmjs.com/package/handlebars-csp-hash
- Repository: https://github.com/mikehall314/handlebars-csp-hash
- Homepage: https://github.com/mikehall314/handlebars-csp-hash#readme
- Issues: https://github.com/mikehall314/handlebars-csp-hash/issues
- npm.io page: https://npm.io/package/handlebars-csp-hash

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2019-10-03

## README

# What is this?
This is a simple handlebars helper which will generate a
`Content-Security-Policy` hash for an inline script or style, which you can
drop into the header of your web page.

# Usage
```
npm install handlebars-csp-hash
```

In your handlebars template:
```handlebars
<meta
    http-equiv="Content-Security-Policy"
    content="default-src 'self'; style-src 'self' '{{{ csp-hash "build/inline.css" }}}' 'unsafe-inline'"
    >
```

# Options
By default it will generate a SHA256, but you can also use SHA384 or SHA512
```handlebars
{{ csp-hash "build/inline.css" "sha384" }}
```

---
_Source: https://npm.io/package/handlebars-csp-hash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
