QuickBooks/IPP/OAuth.php
protected function _generateSignature_RSA($sbs, $method, $url, $params = array())
	{
		// $res = ... 
		$res = openssl_pkey_get_private('file://' . $this->_keyfile);
		
		/*
		print('key id is: [');
		print_r($res);
		print(']');
		print("\n\n\n");
		*/
		
		$signature = null;
		$retr = openssl_sign($sbs, $signature, $res);
		
		openssl_free_key($res);
		
		return array(
			0 => $sbs, 
			1 => base64_encode($signature), 
			);
	}
protected function _generateSignature_RSA($sbs, $method, $url, $params = array())
	{
		// $res = ... 
		$res = openssl_pkey_get_private('file://' . $this->_keyfile);
		
		/*
		print('key id is: [');
		print_r($res);
		print(']');
		print("\n\n\n");
		*/
		
		$signature = null;
		$retr = openssl_sign($sbs, $signature, $res);
		
		openssl_free_key($res);
		
		return array(
			0 => $sbs, 
			1 => base64_encode($signature), 
			);
	}
/*
Pull the private key ID from the certificate
$privatekeyid = openssl_get_privatekey($cert);

Sign using the key
$sig = false;
$ok  = openssl_sign($base_string, $sig, $privatekeyid);

Release the key resource
openssl_free_key($privatekeyid);

base64_encode($sig)