]> source.dussan.org Git - nextcloud-server.git/commitdiff
define key size in constructor, otherwise the key size will depend on the servers...
authorBjörn Schießle <schiessle@owncloud.com>
Mon, 4 Mar 2013 14:33:38 +0000 (15:33 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Mon, 4 Mar 2013 14:33:38 +0000 (15:33 +0100)
apps/files_encryption/lib/crypt.php

index a138f5f3cb09a089cc11128370bd86b0c2b87ee8..2be6e3ae5d9729880746b452710e95a9ac582db8 100755 (executable)
@@ -56,7 +56,7 @@ class Crypt {
          */\r
        public static function createKeypair() {\r
                \r
-               $res = openssl_pkey_new();\r
+               $res = openssl_pkey_new(array('private_key_bits' => 4096));\r
 \r
                // Get private key\r
                openssl_pkey_export( $res, $privateKey );\r
@@ -450,7 +450,7 @@ class Crypt {
          * @returns encrypted file\r
          */\r
        public static function keyEncrypt( $plainContent, $publicKey ) {\r
-               \r
+\r
                openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey );\r
                \r
                return $encryptedContent;\r