mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:10:15 +00: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
32
library/defuse/php-encryption-1.2.1/tests/runtime.php
Normal file
32
library/defuse/php-encryption-1.2.1/tests/runtime.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
// Set the encoding to something more "challenging."
|
||||
$ret = mb_internal_encoding('UTF-8');
|
||||
if ($ret === FALSE) {
|
||||
echo "Couldn't set encoding.";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Dump out the settings / encoding for future reference.
|
||||
$val = ini_get("mbstring.func_overload");
|
||||
echo "Settings: \n";
|
||||
echo " func_overload: " . $val . "\n";
|
||||
echo " mb_internal_encoding(): " . mb_internal_encoding() . "\n";
|
||||
|
||||
// Perform the tests.
|
||||
require_once('Crypto.php');
|
||||
try {
|
||||
Crypto::RuntimeTest();
|
||||
echo "TEST PASSED!\n";
|
||||
exit(0);
|
||||
} catch (CryptoTestFailedException $ex) {
|
||||
echo "TEST FAILED!\n";
|
||||
var_dump($ex);
|
||||
exit(1);
|
||||
} catch (CannotPerformOperationException $ex) {
|
||||
echo "TEST FAILED\n";
|
||||
var_dump($ex);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue