mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Update crypt.php
Use a 256-bit random value
This commit is contained in:
parent
36da3bc359
commit
09cc020535
1 changed files with 2 additions and 2 deletions
|
|
@ -497,13 +497,13 @@ class Crypt {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Generate a pseudo random 2048-bit ASCII key, used as file key
|
||||
* @brief Generate a pseudo random 256-bit ASCII key, used as file key
|
||||
* @returns $key Generated key
|
||||
*/
|
||||
public static function generateKey() {
|
||||
|
||||
// Generate key
|
||||
if ($key = base64_encode(openssl_random_pseudo_bytes(256, $strong))) {
|
||||
if ($key = base64_encode(openssl_random_pseudo_bytes(32, $strong))) {
|
||||
|
||||
if (!$strong) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue