Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

integrity-checker

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

integrity-checker

Easily verify the integrity of files within a project.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Integrity Checker

Easily verify the integrity of files within a project.

  • Easily check whether a file has been modified
  • Check the hash codes of a file
  • Customize encryption keys to the project/folder/files
  • Easily hash files within CLI or through JS.

Usage

This library can be used in:

  • Node (Plain JavaScript)
  • Node (TypeScript)

Use with Node (JavaScript)

Use npm to install it:

cd into the root directory of your project, where the package.json file is located and do:

> npm install integrity-checker --save

import it into your project:

const integrity = require("integrity-checker");

function integrityCheck() {
    if (integrity.checkDir("./", "Key", "IV")) {
        // Integrity check passed - Files not modified
    } else {
        // Integrity check failed - Files possibly modified
    }
}

Use with Node (TypeScript)

Use npm to install it:

cd into the root directory of your project, where the package.json file is located and do:

> npm install integrity-checker --save

import it into your project:

import integrity from "integrity-checker";

function integrityCheck() {
    if (integrity.checkDir("./", "Key", "IV")) {
        // Integrity check passed - Files not modified
    } else {
        // Integrity check failed - Files possibly modified
    }
}

Commands

For quick access to the hash values of a project/folder/file, you can use these commands:

> integrity check <file> <key> <iv>
Check the integrity of a file.

> integrity save <file> [key] [iv]
Save the file's hash for a integrity check.

> integrity hash <file>
Get the hash value of a file.

> integrity genkeys
Generate keys for hash encryption.

Information

You can easily implement the module into your project, for checking the integrity of files when someone uses the application. We recommend that you include a integrity check on all files in at least 2+ files so that if someone changes one the other files will detect that.

Keywords

FAQs

Package last updated on 02 Jan 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc