diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/lib/crypto/crypt.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php index e071819b163..d5a41c29009 100644 --- a/apps/encryption/lib/crypto/crypt.php +++ b/apps/encryption/lib/crypto/crypt.php @@ -614,14 +614,7 @@ class Crypt { * @throws \Exception */ public function generateFileKey() { - // Generate key - $key = base64_encode(openssl_random_pseudo_bytes(32, $strong)); - if (!$key || !$strong) { - // If OpenSSL indicates randomness is insecure, log error - throw new \Exception('Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()'); - } - - return $key; + return base64_encode(random_bytes(32)); } /** |