Answers for "public key and secret key with php authentication"

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

Browse Popular Code Answers by Language