<commit_before><?php
/** Use JS to gather some entropy for key generation (additional will be created on submit)
*
* Copyright (C) 2012 <NAME>
* Released under GNU GPL V2
* See LICENSE
*
*
* 
*/

defined('_CREDLOCK') or die;


if (!isset($notifications)){
global $notificiations;
}
$notifications->RequireScript('entropy');


// Are we processing the generated or outputting the field
if ($submitted):


$entropy = BTMain::getVar('gEntropy');

$entropyseed = mt_rand(0,90000);

$x = 80;
$arrlength = count($arr) - 1;


      while ($x > 0){

      $key = mt_rand(32,254);
      $ecryptkey .= mt_rand(32,254);

	if ($key == 127 || $ecryptkey == 127){
	// Skip the delete char
	continue;
	}


      $seed .= chr($key);
      $ecrypt .= mt_rand(0,99000) . chr($ecryptkey);

      $x--;
      }



$newkey = $entropyseed . $entropy . $seed;



if (!$crypt){
$crypt = new Crypto;
}


$newkey = $crypt->encrypt($newkey,'ONEWAY',$ecrypt);








else:


?>
<div><commit_msg>Added support for up to 6096-bit encryption<commit_after><?php
/** Use JS to gather some entropy for key generation (additional will be created on submit)
*
* Copyright (C) 2012 <NAME>
* Released under GNU GPL V2
* See LICENSE
*
*
* 
*/

defined('_CREDLOCK') or die;


if (!isset($notifications)){
global $notificiations;
}
$notifications->RequireScript('entropy');


// Are we processing the generated or outputting the field
if ($submitted):


$entropy = BTMain::getVar('gEntropy');

$entropyseed = mt_rand(1000,999000);

$x = 500;
$arrlength = count($arr) - 1;


      while ($x > 0){

      $key = mt_rand(32,254);
      $ecryptkey = mt_rand(32,254);
      $prekey = mt_rand(32,254);

	if ($key == 127 || $ecryptkey == 127){
	// Skip the delete char
	continue;
	}


      $seed .= chr($key);
      $ecrypt .= mt_rand(0,99000) . chr($ecryptkey);
      $prkey .= chr($prekey);

      $x--;
      }

$prkey = substr($prkey, mt_rand(0,475), 25);


$newkey = $entropyseed . $prkey . $entropy . $seed;



if (!$crypt){
$crypt = new Crypto;
}


$newkey = $crypt->encrypt($newkey,'ONEWAY',$ecrypt);







else:


?>
<div>
{'fraction_non_alphanumeric': 0.174496644295302, 'fraction_numerical': 0.045062320230105465, 'mean_word_length': 3.356993736951983, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '5912875', 'n_tokens_mistral': 870, 'n_tokens_neox': 752, 'n_words': 196}