Hi,
I need to translate the following code to C# from php. What libraries / namespaces do I need to use?
function sign($method, $uuid, $data) {
$merchant_private_key = openssl_get_privatekey(file_get_contents('merchant_private_key.pem'));
$plaintext = $method . $uuid . serialize_data($data);
**openssl_sign($plaintext, $signature, $merchant_private_key);**
return base64_encode($signature);
}
The api can be found over at http://php.net/manual/en/function.openssl-sign.php. Where do I start? I have no idea what the open_ssl sign in php does behind the covers.
Anyone able to help out that knows both php and C# or could someone at least explain what openssl_sign does in the background so that I can port it.
EDIT: 2010-08-18 I can't find a way to use openssl, it keeps saying it can't load managedopenssl.dll. Think it is because of my machine being x64.