开发者社区> 镜像站> NPM> cipher-base
cipher-base
abstract base class for crypto-streams
Last updated 3 years ago by cwmma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cipher-base 
SYNC missed versions from official npm registry.

cipher-base

Build Status

Abstract base class to inherit from if you want to create streams implementing the same api as node crypto streams.

Requires you to implement 2 methods _final and _update. _update takes a buffer and should return a buffer, _final takes no arguments and should return a buffer.

The constructor takes one argument and that is a string which if present switches it into hash mode, i.e. the object you get from crypto.createHash or crypto.createSign, this switches the name of the final method to be the string you passed instead of final and returns this from update.

Current Tags

  • 1.0.4                                ...           latest (3 years ago)

5 Versions

  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 2,218
This Week 105,838
This Month 71,145
Last Day 34,600
Last Week 196,623
Last Month 809,616
Dependencies (2)
Dev Dependencies (3)
Dependents (113)