feat: KeyGenerator — typsicherer Schlüssel-Generator für AES-Cipher #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
Aktuell erzeugen Nutzer Schlüssel manuell via
bin2hex(random_bytes(32)). Ein dedizierterKeyGeneratormacht den Intent explizit, verhindert falsche Byte-Längen und ist direkt anAesCiphergekoppelt.API
Implementierungsdetails
generate(AesCipher $cipher): stringbin2hex(random_bytes($cipher->requiredHexKeyLength() / 2))AesEncryptionServiceakzeptiertTez\Utils\Crypto\SymmetricAufgaben
src/Symmetric/KeyGenerator.phpimplementierentests/Symmetric/KeyGeneratorTest.phpAbhängigkeiten