diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 16:31:24 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 16:31:24 +0100 |
commit | 53abc4c272be9ecc951274458d054dbaf86e594d (patch) | |
tree | 5d69eca59cf3b51c95ecad190f8cdb058ab9e3f7 /server/helpers/peertube-crypto.ts | |
parent | 604e02abcba0a50be23f243db30eca94b68cd35f (diff) | |
download | PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.gz PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.zst PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.zip |
Upgrade server packages
Diffstat (limited to 'server/helpers/peertube-crypto.ts')
-rw-r--r-- | server/helpers/peertube-crypto.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index fbc3bdcc2..10a226af4 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts | |||
@@ -40,7 +40,7 @@ function checkSignature (publicKey: string, data: string, hexSignature: string) | |||
40 | return isValid | 40 | return isValid |
41 | } | 41 | } |
42 | 42 | ||
43 | async function sign (data: string|Object) { | 43 | async function sign (data: string | Object) { |
44 | const sign = crypto.createSign(SIGNATURE_ALGORITHM) | 44 | const sign = crypto.createSign(SIGNATURE_ALGORITHM) |
45 | 45 | ||
46 | let dataString: string | 46 | let dataString: string |
@@ -71,13 +71,13 @@ async function createCertsIfNotExist () { | |||
71 | return | 71 | return |
72 | } | 72 | } |
73 | 73 | ||
74 | return await createCerts() | 74 | return createCerts() |
75 | } | 75 | } |
76 | 76 | ||
77 | async function cryptPassword (password: string) { | 77 | async function cryptPassword (password: string) { |
78 | const salt = await bcryptGenSaltPromise(BCRYPT_SALT_SIZE) | 78 | const salt = await bcryptGenSaltPromise(BCRYPT_SALT_SIZE) |
79 | 79 | ||
80 | return await bcryptHashPromise(password, salt) | 80 | return bcryptHashPromise(password, salt) |
81 | } | 81 | } |
82 | 82 | ||
83 | function getMyPrivateCert () { | 83 | function getMyPrivateCert () { |