<commit_before><?php namespace App\Http\Controllers;

use App\Config;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session;
use League\Flysystem\Exception;
use Psy\TabCompletion\Matcher\KeywordsMatcher;

class RSAController extends Controller {
    public static function Test(Request $request){
        $config = array('private_key_bits' => 512);
        $privKey = openssl_pkey_new($config);
        echo openssl_error_string();
        var_dump($privKey);
        openssl_pkey_export($privKey, $privKey2);
        $pubKey = openssl_pkey_get_details($privKey);
        $pubKey = $pubKey["key"];
        var_dump($privKey2);
        var_dump($pubKey);

    }
    public static function KeyExchange($ClientKey,$request){
        $res = "";
        $crypt = new mycrypt();
        $FingerPrintObj=new FingerPrintResponse();
        $FingerPrintObj->VerifyString = str_random(32);
        try{
            $res = $crypt->encrypt(json_encode($FingerPrintObj),$ClientKey);
        }catch (\Exception $e){
            abort(404);
        }
        $fp = md5(time().str_random(16));
        $Session = new \App\Session();
        $Session->session_fp = $fp;<commit_msg>编写安装脚本<commit_after><?php namespace App\Http\Controllers;

use App\Config;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session;
use League\Flysystem\Exception;
use Psy\TabCompletion\Matcher\KeywordsMatcher;

class RSAController extends Controller {
    public static function Test(Request $request){
        $config = array('private_key_bits' => 512);
        $privKey = openssl_pkey_new($config);
        var_dump($privKey);
        openssl_pkey_export($privKey, $privKey2);
        $pubKey = openssl_pkey_get_details($privKey);
        $pubKey = $pubKey["key"];
        var_dump($privKey2);
        var_dump($pubKey);

    }
    public static function KeyExchange($ClientKey,$request){
        $res = "";
        $crypt = new mycrypt();
        $FingerPrintObj=new FingerPrintResponse();
        $FingerPrintObj->VerifyString = str_random(32);
        try{
            $res = $crypt->encrypt(json_encode($FingerPrintObj),$ClientKey);
        }catch (\Exception $e){
            abort(404);
        }
        $fp = md5(time().str_random(16));
        $Session = new \App\Session();
        $Session->session_fp = $fp;
{'fraction_non_alphanumeric': 0.1302163833075734, 'fraction_numerical': 0.010046367851622875, 'mean_word_length': 3.237315875613748, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3296736', 'n_tokens_mistral': 808, 'n_tokens_neox': 812, 'n_words': 141}