aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/helpers/peertube-crypto.js10
-rw-r--r--server/initializers/constants.js1
-rw-r--r--server/initializers/migrations/0005-example.js22
3 files changed, 11 insertions, 22 deletions
diff --git a/server/helpers/peertube-crypto.js b/server/helpers/peertube-crypto.js
index 2e07df00e..302ddca58 100644
--- a/server/helpers/peertube-crypto.js
+++ b/server/helpers/peertube-crypto.js
@@ -9,8 +9,6 @@ const ursa = require('ursa')
9const constants = require('../initializers/constants') 9const constants = require('../initializers/constants')
10const logger = require('./logger') 10const logger = require('./logger')
11 11
12const algorithm = 'aes-256-ctr'
13
14const peertubeCrypto = { 12const peertubeCrypto = {
15 checkSignature, 13 checkSignature,
16 comparePassword, 14 comparePassword,
@@ -113,11 +111,3 @@ function createCerts (callback) {
113 }) 111 })
114 }) 112 })
115} 113}
116
117function generatePassword (callback) {
118 crypto.randomBytes(32, function (err, buf) {
119 if (err) return callback(err)
120
121 callback(null, buf.toString('utf8'))
122 })
123}
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index 6f39b65da..fc501845a 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -1,7 +1,6 @@
1'use strict' 1'use strict'
2 2
3const config = require('config') 3const config = require('config')
4const maxBy = require('lodash/maxBy')
5const path = require('path') 4const path = require('path')
6 5
7// --------------------------------------------------------------------------- 6// ---------------------------------------------------------------------------
diff --git a/server/initializers/migrations/0005-example.js b/server/initializers/migrations/0005-example.js
index 481c2c4dd..cedc42919 100644
--- a/server/initializers/migrations/0005-example.js
+++ b/server/initializers/migrations/0005-example.js
@@ -1,14 +1,14 @@
1/* 1// /*
2 This is just an example. 2// This is just an example.
3*/ 3// */
4 4
5const db = require('../database') 5// const db = require('../database')
6 6
7// options contains the transaction 7// // options contains the transaction
8exports.up = function (options, callback) { 8// exports.up = function (options, callback) {
9 // db.Application.create({ migrationVersion: 42 }, { transaction: options.transaction }).asCallback(callback) 9// db.Application.create({ migrationVersion: 42 }, { transaction: options.transaction }).asCallback(callback)
10} 10// }
11 11
12exports.down = function (options, callback) { 12// exports.down = function (options, callback) {
13 throw new Error('Not implemented.') 13// throw new Error('Not implemented.')
14} 14// }