function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumant KuchipudiSumant Kuchipudi 

How to generate digital signature with key values?

Hi,

How can I generate Digital Signature with the following Strings I have? 
Note: The cryptographic hash functions are supported: MD5, SHA-256, SHA-384, and SHA-512

The Strings are : 
 apikey
 ipaddress
 utctime
 randomguid
 privatekey

I need to genrate just like the following 
$hash = encrypt($apikey + $ipaddress + $time + $random + $privatekey);

Please advice.
Sumant KuchipudiSumant Kuchipudi
I need to conver the following pseudo code to apex with the following inputs
The Strings are : 
 apikey
 ipaddress
 utctime
 randomguid
 privatekey

$hash = encrypt($apikey + $ipaddress + $time + $random + $privatekey);
 
// Your request URL includes the $time, $random, and $hash values (but NEVERthe $privatekey!) as parameters
$apiurl = "https://yourinstitution.collegiatelink.net/api/";
$resource = "organizations?";

$requesturl = $apiurl + $resource + "time=" + $time + "&apikey=" + $apikey + "&random=" + $random + "&hash=" + $hash;
 
// Your request method type will be "GET" on most calls
$data = send_request("GET", $requesturl);

Please advice.
@GM@GM
Refer our std documents and try to create outbound apex rest API of 'GET' method

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_http.htm

There is no standard function to encrypt the string in apex REST/SOAP 
http://salesforce.stackexchange.com/questions/73461/security-of-encrypted-fields-over-soap-in-salesforce

Regards,
GM