Socket
Socket
Sign inDemoInstall

pagecrypt

Package Overview
Dependencies
17
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pagecrypt

A CLI to add client-side password-protection for HTML files


Version published
Weekly downloads
1.3K
increased by23.41%
Maintainers
1
Install size
1.10 MB
Created
Weekly downloads
 

Changelog

Source

1.1.0 - 2021-03-14

Features

  • Added JS API

Usage:

import { encrypt } from 'pagecrypt'

await encrypt('input.html', 'output.html', 'strong password')
  • Improved documentation
  • Added basic testing setup to easily verify pagecrypt builds

Fixes

  • Updated how decrypt-template.html is loaded to allow JS API to work from any directory, and not just project root.

Readme

Source

PageCrypt - Password Protected HTML Pages

A CLI to add client-side password-protection for HTML files

Inspired by MaxLaumeister/PageCrypt. Thanks for sharing an excellent starting point to create this CLI!

Usage

CLI

It's easy to start encrypting a single HTML-file:

npx pagecrypt [input.html] [output.html] [password]

Automate pagecrypt in your build process

npm i -D pagecrypt

package.json:

{
    "devDependencies": {
        "pagecrypt": "^0.1.0"
    },
    "scripts": {
        "build": "...",
        "postbuild": "pagecrypt index.html encrypted.html strong-password"
    }
}

Node.js API

You can use pagecrypt in your Node.js scripts:

import { encrypt } from 'pagecrypt'

await encrypt('input.html', 'output.html', 'strong password')

Development

The project consists of two parts:

  • /web - Web frontend for public webpage (decrypt-template.html). Built using Snowpack & TailwindCSS.
  • /index.js - pagecrypt CLI.

Testing

npm test will run basic tests for JS API and CLI. Verify results by opening test/out-js.html and test/out-cli.html in your browser.


Welcome to submit your pull requests!

Keywords

FAQs

Last updated on 14 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc