From c8617ff55e35199c6303c4801d9c843ff5fddcf7 Mon Sep 17 00:00:00 2001 From: mserranom Date: Mon, 17 Feb 2020 16:17:53 +0100 Subject: [PATCH] updated paths --- libraries/access-token-encryptor/.gitignore | 18 -------------- .../access-token-encryptor/Gruntfile.coffee | 24 +------------------ .../{coffee => js}/AccessTokenEncryptor.js | 2 ++ .../AccessTokenEncryptorTests.js | 0 4 files changed, 3 insertions(+), 41 deletions(-) rename libraries/access-token-encryptor/lib/{coffee => js}/AccessTokenEncryptor.js (98%) rename libraries/access-token-encryptor/test/unit/{coffee => js}/AccessTokenEncryptorTests.js (100%) diff --git a/libraries/access-token-encryptor/.gitignore b/libraries/access-token-encryptor/.gitignore index e9154dde4a..14762eb628 100644 --- a/libraries/access-token-encryptor/.gitignore +++ b/libraries/access-token-encryptor/.gitignore @@ -36,26 +36,8 @@ Icon? Thumbs.db /node_modules/* -test/IntergrationTests/js/* data/*/* -app.js -app/js/* -lib/js/* -test/IntergrationTests/js/* -test/UnitTests/js/* -cookies.txt -uploads/* -public/js/editor.js -public/js/home.js -public/js/forms.js -public/js/gui.js -public/js/admin.js -public/stylesheets/mainStyle.css -public/minjs/ -test/unit/js/ -test/acceptance/js - **.swp /log.json diff --git a/libraries/access-token-encryptor/Gruntfile.coffee b/libraries/access-token-encryptor/Gruntfile.coffee index ff5a6f71fa..d62a0b0fc0 100644 --- a/libraries/access-token-encryptor/Gruntfile.coffee +++ b/libraries/access-token-encryptor/Gruntfile.coffee @@ -2,36 +2,14 @@ spawn = require("child_process").spawn module.exports = (grunt) -> grunt.initConfig - coffee: - # app_src: - # expand: true, - # cwd: "app/coffee" - # src: ['**/*.coffee'], - # dest: 'app/js/', - # ext: '.js' - - # app: - # src: "app.coffee" - # dest: "app.js" unit_tests: expand: true - cwd: "test/unit/coffee" + cwd: "test/unit/js" src: ["**/*.coffee"] dest: "test/unit/js/" ext: ".js" - # acceptance_tests: - # expand: true - # cwd: "test/acceptance/coffee" - # src: ["**/*.coffee"] - # dest: "test/acceptance/js/" - # ext: ".js" - - clean: - app: ["lib/js/"] - unit_tests: ["test/unit/js"] - mochaTest: unit: options: diff --git a/libraries/access-token-encryptor/lib/coffee/AccessTokenEncryptor.js b/libraries/access-token-encryptor/lib/js/AccessTokenEncryptor.js similarity index 98% rename from libraries/access-token-encryptor/lib/coffee/AccessTokenEncryptor.js rename to libraries/access-token-encryptor/lib/js/AccessTokenEncryptor.js index 3e1068d9f6..73633811e4 100644 --- a/libraries/access-token-encryptor/lib/coffee/AccessTokenEncryptor.js +++ b/libraries/access-token-encryptor/lib/js/AccessTokenEncryptor.js @@ -9,6 +9,8 @@ */ const crypto = require('crypto'); +const Buffer = require('buffer').Buffer; + const ALGORITHM = 'aes-256-ctr'; const keyFn = (password, salt, callback)=> crypto.pbkdf2(password, salt, 10000, 64, 'sha1', callback); diff --git a/libraries/access-token-encryptor/test/unit/coffee/AccessTokenEncryptorTests.js b/libraries/access-token-encryptor/test/unit/js/AccessTokenEncryptorTests.js similarity index 100% rename from libraries/access-token-encryptor/test/unit/coffee/AccessTokenEncryptorTests.js rename to libraries/access-token-encryptor/test/unit/js/AccessTokenEncryptorTests.js