Answers for "php sign string with private key"

PHP
1

php sign with private key

<?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://sign/key.pem");

// compute signature
openssl_sign($data, $signature, $pkeyid);

// free the key from memory
openssl_free_key($pkeyid);
Posted by: Guest on September-26-2021

Code answers related to "php sign string with private key"

Browse Popular Code Answers by Language