-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.php
executable file
·27 lines (18 loc) · 883 Bytes
/
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env php
<?php
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/src/CryptCommand.php';
require __DIR__ . '/src/EncryptCommand.php';
require __DIR__ . '/src/DecryptCommand.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
$application = new Application('fileencrypt', '0.1');
$encryptCommand = new \App\EncryptCommand();
$encryptCommand->addArgument('input', InputArgument::REQUIRED, 'Input file to be encrypted (plaintext)')
->addArgument('output', InputArgument::REQUIRED, 'Output file');
$decryptCommand = new \App\DecryptCommand();
$decryptCommand->addArgument('input', InputArgument::REQUIRED, 'Input file to be decrypted (ciphertext)')
->addArgument('output', InputArgument::REQUIRED, 'Output file');
$application->add($encryptCommand);
$application->add($decryptCommand);
$application->run();