download-checksum

0.3.1 • Public • Published

Build Status Coverage Status

download-checksum

Checksums plugin for download

Allow to check the downloads by using any of the accepted checksums of the Node.js crypto module and PGP signatures. It allow to check several algorythms for a single file, too.

Usage

var Download = require('download')
var checksum = require('download-checksum')
 
var downloads =
[
  {
    url: 'http://example.com/foo.zip',
    sha256: '<hex string>'
  },
  {
    url: 'http://example.com/cat.jpg',
    md5: '<hex string>'
  },
  {
    url: 'http://example.com/Windows_10.tar.gz',
    pgp:
    {
      keys: '<armed PGP string>',
      signature: '<armed PGP string>'
    }
  },
  {
    url: 'http://example.com/Area_51.zip',
    pgp:
    {
      keysFile: 'path/to/publicKey.pub',
      signatureFile: 'path/to/signature.asc'
    }
  }
]
 
Download()
  .get(downloads[0].url)
  .get(downloads[1].url)
  .get(downloads[2].url)
  .get(downloads[3].url)
  .dest('dest')
  .use(checksum(downloads))
  .run()

/download-checksum/

    Package Sidebar

    Install

    npm i download-checksum

    Weekly Downloads

    12

    Version

    0.3.1

    License

    ISC

    Unpacked Size

    9.21 kB

    Total Files

    8

    Last publish

    Collaborators

    • piranna