Digital Signature with SHA256 RSA
To address potential issues related to digital signatures using SHA256 RSA, you can directly utilize the TScKey object as demonstrated in the following example:
uses ...ScBridge, ScUtils;
var
Source, Signed: TBytes;
aComment: string;
Key: TScKey;
begin
Key := TScKey.Create();
Key.ImportFrom('MyKeyFile.pem', Password, aComment);
Signed := Key.Sign(Source, haSHA2_256);
if Key.VerifySign(Source, Signed, haSHA2_256) = True then
// Sign is verified
Key.Free;
end;
Important Note: The TScKey object is designed to work with TBytes buffers and cannot directly sign files. Therefore, ensure that the Source TBytes buffer is populated with the data you intend to sign before calling the TScKey.Sign method.
See also:
Related Articles
How to Expedite Error Report Resolution
In addition to the standard procedure for submitting an Error Report, the following steps can significantly help us resolve the issue more quickly and efficiently. While the information provided in the original report is valuable, these additional ...
Can a Single License Be Shared by Two Users on a Remote Machine?
According to the company's End User License Agreement (EULA) policy, each purchased license provides a key that can be used for activation on two machines simultaneously. For more details, please refer to the following link: Devart EULA. It's ...
How to Work in Power Query Using ODBC Driver
1. Connect to an ODBC Source In Power BI Desktop, go to the Home tab and click on Get Data to connect to an ODBC source. From the list of available connections, select the DSN connection that you created in the ODBC Administration tool. You can learn ...
Setting Up MongoDB Atlas and Connecting via Devart ODBC Driver
This article will guide you through the process of setting up MongoDB Atlas, creating a cluster, configuring access, obtaining the connection string, and connecting to MongoDB Atlas using the Devart ODBC Driver for MongoDB. 1. Creating a Cluster in ...