ncc/tests/third_party/php-encryption/create_random_key.php

9 lines
325 B
PHP
Raw Normal View History

2022-06-26 10:03:59 -04:00
<?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);