From 1e3f1e4a2941410d8ecdb717b77a13ebd0cec884 Mon Sep 17 00:00:00 2001 From: scott lindh Date: Thu, 21 Jun 2018 20:28:17 +1000 Subject: [PATCH] Fix for "Can not decrypt" issue #9 Fix for "Can not decrypt" issue #9 , padding issue on decrypt fix is in line 62. --- lib/file-encryptor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/file-encryptor.js b/lib/file-encryptor.js index 33deefe..df6906c 100644 --- a/lib/file-encryptor.js +++ b/lib/file-encryptor.js @@ -59,6 +59,7 @@ Encryptor.decryptFile = function(inputPath, outputPath, key, options, callback) }); inputStream.on('end', function() { + cipher.setAutoPadding(false); try { var buf = new Buffer(cipher.final('binary'), 'binary'); outputStream.write(buf);