473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Signature generation with VB.net

my program is developed by Vb.net 2005. and i need to call web API using VB.Net 2005 and it has to generate Signature. i'm generated signature but API retern Invalid Signature Error. sample signature code with PHP. here is the sample code. and how can i generate Signature using this example. really thanks for your help

1. Concatenate (order values based on the alphabetical order of the parameter names) all values to single string.

Expand|Select|Wrap|Line Numbers
  1. $dataString ​=​$amount​. ​$apiToken​.​$UserId​.​$requestId​;
2. Sign data string using RSA signing algorithm. Hashing algorithm is SHA256.

Expand|Select|Wrap|Line Numbers
  1. $pkeyid ​= openssl_pkey_get_private(​"file:///private_key".pem"​)​; $signResult ​= openssl_sign(​$dataString​, ​$signature​, ​$pkeyid​, ​OPENSSL_ALGO_SHA256 ​ )​;
3. Base64 encodes the generated signature

Expand|Select|Wrap|Line Numbers
  1. $signature ​= base64_encode(​$signature​)​; 

Thanks
Feb 1 '20 #1
0 2532

Sign in to post your reply or Sign up for a free account.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
1
by: José María Mateos | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've been searchin in PEAR and I have found no package that will allow me the creation of calendar files. Is there any other solution? ...
8
by: Max M | last post by:
Yesterday there was an article on Slashdot: http://books.slashdot.org/article.pl?sid=03/09/04/1415210&mode=flat&tid=108&tid=126&tid=156 It is about automatic code generation. I got interrested...
0
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
15
by: Kannan Goundan | last post by:
Maintaining a C++ header file can be painful. I want a way to automatically generate header files from the implementation file. Does anybody know of a program that does this? If not, I'd like...
11
by: Marco Loskamp | last post by:
Dear list, I'm trying to dynamically generate functions; it seems that what I really want is beyond C itself, but I'd like to be confirmed here. In the minimal example below, I'd like to...
1
by: PaulJB PHD | last post by:
Is there anyway to use the RSACryptoServiceProvider with a key size smaller than 384? I'm using VB.NET in the 1.1 Framework. I'm trying to generate a daily passcode string by hashing the...
0
by: dawid.greyvenstein | last post by:
Hi, I have a bunch of DataTables with TableAdapters in a DataSet that hook up with stored procedures. Whenever I changed parameters on a stored proc, I just reconfigured the TableAdapter, which...
1
by: Dan Reber | last post by:
(Originally posted to WindowsForms newsgroup with no response, is there a Visual Studio newsgroup?) There are times when I mistakenly double-click a control and then VS goes to the code window...
3
by: Thomas Guettler | last post by:
Hi, I looked for a solution to talk to a web service which offers its signature with a wsdl file. I googled for 'wsdl python' and found ZSI. This project uses code generation. That's...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.