diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff6768e..7871a2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,10 @@ before_script: pages: stage: deploy script: + - export SALT="salt_and_pepper" + - export KEY="qwerty" + - export PLAYER_LIST_LOCATION="api/players.json.spritz" + - ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts - npm install - node_modules/.bin/gulp prod - node_modules/.bin/r.js -o build.js diff --git a/gulpfile.js b/gulpfile.js index 6b266ce..b0038d3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -42,7 +42,8 @@ gulp.task('compile-results', function(){ var encryptFile = function(message){ var keyLengthInBytes = 128; - var stringKey = process.env.KEY || 'qwerty'; + var salt = process.env.SALT || ''; + var stringKey = salt + (process.env.KEY || 'qwerty'); var key = spritz.hash(stringKey, keyLengthInBytes); var byteArrMessage = spritz.stringToUtf8ByteArray(message); var cypher = spritz.encrypt(key, byteArrMessage);