[Pkg-javascript-commits] [node-browserify-aes] 05/43: fixes #39 (#40)

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 14:41:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-browserify-aes.

commit 8ce085e24a1a96b6b185bb91e84288682a3f20bf
Author: Hrishikesh Barman <geekodour at users.noreply.github.com>
Date:   Thu Mar 16 18:02:15 2017 +0530

    fixes #39 (#40)
---
 test/index.js | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/test/index.js b/test/index.js
index af54547..a772886 100644
--- a/test/index.js
+++ b/test/index.js
@@ -535,15 +535,12 @@ test('handle long uft8 plaintexts', function (t) {
   t.plan(1)
   var salt = new Buffer(32)
   salt.fill(0)
-  function encrypt (txt, passwd) {
+  function encrypt (txt) {
     var cipher = crypto.createCipher('aes-256-cbc', salt)
-    var result = cipher.update(txt, 'utf8', 'base64')
-    result += cipher.final('base64')
-    return result
+    return cipher.update(txt, 'utf8', 'base64') + cipher.final('base64')
   }
-  function decrypt (enc, passwd) {
+  function decrypt (enc) {
     var decipher = crypto.createDecipher('aes-256-cbc', salt)
-
     return decipher.update(enc, 'base64', 'utf8') + decipher.final('utf8')
   }
   var input = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browserify-aes.git



More information about the Pkg-javascript-commits mailing list