---
title: "The &#8220;Digital Signature&#8221; Creation Using .NET (Dotnet)"
url: "https://help.equaze.com/kb/the-digital-signature-creation-using-net-dotnet/"
updated: "2024-11-05"
category: PKI Setup
---

# The &#8220;Digital Signature&#8221; Creation Using .NET (Dotnet)

#### Prerequisites

Have a secure private key and a Certificate Signing Request (CSR) ready. These are essential for securing your digital identity.

Ensure you have access to the PKI sample file that you’ll be editing and updating.

**Setting Up .NET (DotNet)**

**Download and Install .NET**

- Start by downloading and installing .NET, a set of tools and libraries for building applications. Visit [https://dotnet.microsoft.com/en-us/download](https://dotnet.microsoft.com/en-us/download) to get the installer.
- Follow the installation instructions provided on the website.

#### **Editing the PKI Sample File**

**Open File in Visual Studio or Visual Studio Code**

- If you don’t have Visual Studio or Visual Studio Code, these are development environments. Visual Studio is more feature-rich, while Visual Studio Code is lightweight and versatile.
- Open your PKI sample file using either Visual Studio or Visual Studio Code.

**Replace Private Key**

- Locate the existing private key in the file. This key is like a secret password. Replace it with the newly generated secure private key. Ensure that this private key is kept confidential and secure.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-190348.png)

**Replace Certificate Request (CSR)**

- The certificate request (CSR) is like a formal request for a digital certificate. Replace the old one in the file with the newly generated Certificate Signing Request (CSR). This request is crucial for obtaining a valid digital certificate.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-190430.png)

**Paste Certificate**

- After submitting your CSR, you’ll receive a digital certificate. Paste this certificate into the file. Think of it as receiving an official stamp of approval for your digital identity.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-190502.png)

**Paste Body from GET Request**

- Simulate a request for information from the server by using a GET request to [https://api.sim.enumis.co.uk/onlineaccount-api/send/api](https://api.sim.enumis.co.uk/onlineaccount-api/send/api).
- Copy the information (body) received from the server and paste it into your PKI sample file. Use a method called “Paste as escaped string” to ensure proper formatting.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-190738.png)

**Save the File**

- Save the changes made to the PKI sample file. This ensures that the file now contains the updated information necessary for creating the digital signature.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-at-19.08.37-1024x670.png)

#### **Generating the Digital Signature**

**Using Command Prompt/Terminal**

**Specify File Location**

- Open the **command prompt** or **terminal**. Think of it as a text-based interface to communicate with your computer.
- Navigate to the location of the PKI sample file using the `cd "FileLocation"` command. This tells the system where to find the file.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-16-192002.png)

**Run the .NET Application**

- Type the command**`dotnet run`** and press **Enter**. This command runs the .NET application, triggering the process of creating the digital signature.

 ![](https://help.equaze.com/wp-content/uploads/2023/11/Screenshot-2023-11-01-at-19.11.37.png)

**Copy the Digital Signature**

- After the command completes its execution, you’ll see the generated **“Digital signature”** in the output. Copy this digital signature. Consider it as a unique identifier for your transaction.

By meticulously following these steps, you’ve successfully edited the PKI sample file and created a digital signature using .NET. Remember to safeguard your private key and digital signature as they play a crucial role in ensuring the security of your digital transactions.

**Confirmation of Payee error return**

These are errors you will get if Confirmation of Payee failed (with HTTP ERROR 422):
**COPNM00**: Not Match

 ![](https://help.equaze.com/wp-content/uploads/2024/11/image-11.png)

**COPNMAT**: Not Match because account type of the beneficiary is wrong (Personal/Business)

 ![](https://help.equaze.com/wp-content/uploads/2024/11/image-12.png)

**COPCM00**: Close Match if you did not put **“allowCloseMatch”: “Y”** when requesting to send fund

 ![](https://help.equaze.com/wp-content/uploads/2024/11/image-13.png)
