studidcard/genkey.php
Raphael Dannecker 48a5360d0d Initial commit
2025-02-25 16:10:55 +01:00

10 lines
310 B
PHP
Executable file

<?php
// Generate keypair
$keyPair = sodium_crypto_sign_keypair();
$privateKey = sodium_crypto_sign_secretkey($keyPair);
$publicKey = sodium_crypto_sign_publickey($keyPair);
// Write keys to file
file_put_contents('keys/private_key.bin', $privateKey);
file_put_contents('keys/public_key.bin', $publicKey);
?>