芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Http/Controllers/FileController.php
replace('_masked.png', '')->__toString(); $decrypted = self::encryptDecrypt($path, 'decrypt'); return response()->redirectTo(asset_url_local_s3($decrypted)); } catch (\Exception $e) { abort(404); } } public static function encryptDecrypt($string, $action = 'encrypt') { $encryptMethod = 'AES-256-CBC'; $secret_key = 'worksuite'; // User define private key $secret_iv = 'froiden'; // User define secret key $key = hash('sha256', $secret_key); $iv = substr(hash('sha256', $secret_iv), 0, 16); // sha256 is hash_hmac_algo if ($action == 'encrypt') { $output = openssl_encrypt($string, $encryptMethod, $key, 0, $iv); return base64_encode($output); } if ($action == 'decrypt') { return openssl_decrypt(base64_decode($string), $encryptMethod, $key, 0, $iv); } } }