1
0
Fork 0

use "random_bytes" instead of "openssl_random_pseudo_bytes"

This commit is contained in:
Michael 2021-05-11 13:12:12 +00:00
commit 74f3c885bf
5 changed files with 8 additions and 8 deletions

View file

@ -1272,7 +1272,7 @@ class DFRN
switch ($rino_remote_version) {
case 1:
$key = openssl_random_pseudo_bytes(16);
$key = random_bytes(16);
$data = self::aesEncrypt($postvars['data'], $key);
break;

View file

@ -2870,9 +2870,9 @@ class Diaspora
return false;
}
$aes_key = openssl_random_pseudo_bytes(32);
$aes_key = random_bytes(32);
$b_aes_key = base64_encode($aes_key);
$iv = openssl_random_pseudo_bytes(16);
$iv = random_bytes(16);
$b_iv = base64_encode($iv);
$ciphertext = self::aesEncrypt($aes_key, $iv, $msg);