Avatar of Camillia
Camillia
Flag for United States of America asked on

What is this Java code doing (need to convert to C#)

What is the meaning of these 2 lines of code in Java? In .Net, I know i need to use cryptography but not sure how to convert them since I dont know the meaning....

This is the example I'm following

https://firstdata.zendesk.com/entries/452518-generating-the-payment-request-form-programmatically


// Use Java Cryptography functions to generate the x_fp_hash value
// generate secret key for HMAC-SHA1 using the transaction
 keySecretKey key = new SecretKeySpec(transactionKey.getBytes(), "HmacSHA1");


// Get instance of Mac object implementing HMAC-SHA1, and
// Initialize it with the above secret key
Mac mac = Mac.getInstance("HmacSHA1");mac.init(key);

Open in new window

ASP.NETC#

Avatar of undefined
Last Comment
Camillia

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rimvis

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Camillia

ASKER
thanks, let me try
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck