I have made a very short secret generating script for if you need to make secret keys for casinos. This makes 3650 days worth of keys (you can easily make more, just change one number) to last 10 years. It generates and inserts the original secret (the thing you use and reveal 24 hours later), and the encrypted version which you release instantly, and it there at any time. It also associates a day per each pair. It inserts it all into a mysql database, but you can obviously change this, maybe insert into a csv file or something else. It is written in php.
This assumes you have a table with 3 columns, date, hash, and secret. You can change the table name if you want, and the hash algorithm. Its up to you what you do with it.
Source code:
<?php
require('conn.php');
// ^ connect to the database on this line. The mysql connection is on the object $db
$e=1;
$start_date = date('n/j/Y');
for ($i = 1; $i <= 3650; $i++) {
$next_date = strtotime($e++." day", strtotime($start_date));
$date = date('n/j/Y',$next_date);
$key = substr(str_shuffle(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ),0, 1) . substr(str_shuffle(aBcEeFgHiJkLmNoPqRstUvWxYz0123456789),0, 31);
$hashkey = hash('sha256', $key);
$stmt = $db->prepare('INSERT INTO crypti_secrets (date, hash, secret) VALUES (:date, :hash, :secret)');
$result = $stmt->execute(array(
'date' => $date,
'hash' => $hashkey,
'secret' => $key,
));
}
?>
Please donate if you found this helpful: 16MtvTUvqwwKwV87nayxPLHTJJZNGPa9qw