ncc/tests/old_tests/third_party/php-encryption/create_random_key.php
2023-08-30 20:04:51 -04:00

9 lines
No EOL
325 B
PHP

<?php
require(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'autoload.php');
print('Generating new random key' . PHP_EOL);
$key = \ncc\Defuse\Crypto\Key::createNewRandomKey();
$ascii_key = $key->saveToAsciiSafeString();
print('Key: ' . $ascii_key . PHP_EOL);