feat: encrypted user passwords

This commit is contained in:
Björn Fromme
2025-04-24 12:26:42 +02:00
parent 5fe88fc0f2
commit fb6665668b
16 changed files with 292 additions and 79 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Command;
use Spatie\Crypto\Rsa\KeyPair;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[AsCommand(name: 'app:crypto:generate-keys', description: 'Generate keypair for encryption')]
class GenerateKeysCommand extends Command
{
public function __construct(private readonly string $path)
{
parent::__construct();
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
(new KeyPair())->generate($this->path.'/private.key', $this->path.'/public.key');
return Command::SUCCESS;
}
}