summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Crypto/Crypt.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-13 21:55:24 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-02-13 21:55:24 +0100
commite2974f1133693c022585d3758df142e0f385cb3e (patch)
treef8d1110d68580b8307e78e1844964b2df486d071 /apps/encryption/lib/Crypto/Crypt.php
parent3fc6d6234e39914d8e6e7d4b9ffe0b5420d3aa2d (diff)
downloadnextcloud-server-e2974f1133693c022585d3758df142e0f385cb3e.tar.gz
nextcloud-server-e2974f1133693c022585d3758df142e0f385cb3e.zip
Simplify return statement
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/encryption/lib/Crypto/Crypt.php')
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index 4d5c20ea75f..49b1bcb41aa 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -196,9 +196,7 @@ class Crypt {
// combine content to encrypt the IV identifier and actual IV
$catFile = $this->concatIV($encryptedContent, $iv);
$catFile = $this->concatSig($catFile, $sig);
- $padded = $this->addPadding($catFile);
-
- return $padded;
+ return $this->addPadding($catFile);
}
/**
@@ -495,8 +493,7 @@ class Crypt {
*/
private function createSignature($data, $passPhrase) {
$passPhrase = hash('sha512', $passPhrase . 'a', true);
- $signature = hash_hmac('sha256', $data, $passPhrase);
- return $signature;
+ return hash_hmac('sha256', $data, $passPhrase);
}