I'm trying to understand -> https://www.php.net/manual/en/function.openssl-sign.php which has &$signature
parameter. I read this -> PHP &$string - What does this mean? but still don't understand why must we have &$signature
as a parameter or how do we use it. The examples at https://www.php.net did not describe the use of that variable.
Here's one of their examples.
<?php
// $data is assumed to contain the data to be signed
// fetch private key from file and ready it
$pkeyid = openssl_pkey_get_private("file://src/openssl-0.9.6/demos/sign/key.pem");
// compute signature
openssl_sign($data, $signature, $pkeyid);
// free the key from memory
openssl_free_key($pkeyid);
?>
Btw, have a fabulous coding new year 2022!