1
|
cipher-base
|
2
|
===
|
3
|
|
4
|
[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base)
|
5
|
|
6
|
Abstract base class to inherit from if you want to create streams implementing
|
7
|
the same api as node crypto streams.
|
8
|
|
9
|
Requires you to implement 2 methods `_final` and `_update`. `_update` takes a
|
10
|
buffer and should return a buffer, `_final` takes no arguments and should return
|
11
|
a buffer.
|
12
|
|
13
|
|
14
|
The constructor takes one argument and that is a string which if present switches
|
15
|
it into hash mode, i.e. the object you get from crypto.createHash or
|
16
|
crypto.createSign, this switches the name of the final method to be the string
|
17
|
you passed instead of `final` and returns `this` from update.
|