mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-13 23:32:20 +05:30
14 lines
372 B
Plaintext
14 lines
372 B
Plaintext
|
#!/bin/env php
|
||
|
<?php
|
||
|
|
||
|
require(__DIR__.'/../vendor/autoload.php');
|
||
|
|
||
|
try {
|
||
|
$key = Crypto::CreateNewRandomKey();
|
||
|
echo sprintf('Created a new crypto key: %s', bin2hex($key)), PHP_EOL;
|
||
|
exit(0);
|
||
|
} catch (CryptoTestFailedException $ex) {
|
||
|
exit('Cannot safely create a key');
|
||
|
} catch (CannotPerformOperationException $ex) {
|
||
|
exit('Cannot safely create a key');
|
||
|
}
|