mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
RINO 2 based on php-encryption
reenable RINO 1 functions, add a deprecation note. use by default RINO 2 , with crypto from php-encryption fallback to RINO 1 for old nodes.
This commit is contained in:
parent
7d83a19fd4
commit
6fbb02fb93
11 changed files with 1038 additions and 32 deletions
|
@ -185,8 +185,9 @@ function salmon_key($pubkey) {
|
|||
}
|
||||
|
||||
|
||||
/** disable rino
|
||||
|
||||
if(! function_exists('aes_decrypt')) {
|
||||
// DEPRECATED IN 3.4.1
|
||||
function aes_decrypt($val,$ky)
|
||||
{
|
||||
$key="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
|
@ -200,6 +201,7 @@ function aes_decrypt($val,$ky)
|
|||
|
||||
|
||||
if(! function_exists('aes_encrypt')) {
|
||||
// DEPRECATED IN 3.4.1
|
||||
function aes_encrypt($val,$ky)
|
||||
{
|
||||
$key="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
|
@ -210,7 +212,6 @@ function aes_encrypt($val,$ky)
|
|||
$val=str_pad($val, (16*(floor(strlen($val) / 16)+(strlen($val) % 16==0?2:1))), chr(16-(strlen($val) % 16)));
|
||||
return mcrypt_encrypt($enc, $key, $val, $mode, mcrypt_create_iv( mcrypt_get_iv_size($enc, $mode), MCRYPT_DEV_URANDOM));
|
||||
}}
|
||||
**/
|
||||
|
||||
function pkcs5_pad ($text, $blocksize)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue