aes: minor.

This commit is contained in:
Christopher Jeffrey 2016-07-16 16:52:19 -07:00
parent 3186aaa6cc
commit 34ecf9b318
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -617,6 +617,8 @@ AESDecipher.prototype.update = function update(data) {
AESDecipher.prototype.final = function final() {
var i, b, n, block;
this.key.destroy();
assert(!this.waiting, 'Bad decrypt (trailing bytes).');
assert(this.lastBlock, 'Bad decrypt (no data).');
@ -640,8 +642,6 @@ AESDecipher.prototype.final = function final() {
block = block.slice(0, -n);
this.key.destroy();
return block;
};