Commit ef884570 authored by Calvin Metcalf's avatar Calvin Metcalf

fix break in node 8

parent de2af975
......@@ -11,6 +11,10 @@ function CipherBase (hashMode) {
} else {
this.final = this._finalOrDigest
}
if (this._final) {
this.__final = this._final
this._final = null
}
this._decoder = null
this._encoding = null
}
......@@ -59,7 +63,7 @@ CipherBase.prototype._transform = function (data, _, next) {
CipherBase.prototype._flush = function (done) {
var err
try {
this.push(this._final())
this.push(this.__final())
} catch (e) {
err = e
} finally {
......@@ -67,7 +71,7 @@ CipherBase.prototype._flush = function (done) {
}
}
CipherBase.prototype._finalOrDigest = function (outputEnc) {
var outData = this._final() || new Buffer('')
var outData = this.__final() || new Buffer('')
if (outputEnc) {
outData = this._toString(outData, outputEnc, true)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment