File: generate-defuse-key

package info (click to toggle)
php-defuse-php-encryption 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 368 kB
  • sloc: php: 1,430; makefile: 26; xml: 13
file content (16 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env php
<?php

if (!include_once('Composer/Autoload/ClassLoader.php')) {
	echo "\nE: install composer for the CLI to work!\n";
	exit(255);
}

$loader = new \Composer\Autoload\ClassLoader();
$loader->setUseIncludePath(true);
$loader->register();

use Defuse\Crypto\Key;

$key = Key::createNewRandomKey();
echo $key->saveToAsciiSafeString(), "\n";