Skip to content

Commit

Permalink
Read private key from config
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Nov 25, 2016
1 parent e9c6b38 commit 0ffa8f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controllers/encrypt.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict'

const config = require(__dirname + '/../config')
const privateKey = require('fs').readFileSync('staticman_key', 'utf8')
const NodeRSA = require('node-rsa')
const key = new NodeRSA()

key.importKey(privateKey)
key.importKey(config.get('rsaPrivateKey'))

module.exports = ((req, res) => {
try {
Expand Down

0 comments on commit 0ffa8f2

Please sign in to comment.