Suoritettu

Convert PHP code to C#

I need the PHP code below converted to C# and can run on UWP.

<?php

if (!isset($argv[3]))

{

echo "Syntax: {$argv[0]} TradeReference BTCAddress UpdateID [debug]\n";

die();

}

// Build data

$tradeID = $argv[1];

$btcAddress = $argv[2];

// Plus one because this update increments the updateID anyway

$updateID = $argv[3] + 1;

$data = json_encode(array('version' => (int)1, 'reference' => $tradeID, 'btcaddress' => $btcAddress, 'updateID' => (int)$updateID));

if (isset($argv[4]) && $argv[4] == 'debug')

echo "Data is {$data}\n";

// Get private key

$fp = fopen("[login to view URL]", "r");

if (!$fp)

die("Could not open private key [login to view URL]\n");

$priv_key = fread($fp, 8192);

fclose($fp);

$pkeyid = openssl_get_privatekey($priv_key);

if (!$pkeyid)

die("Private key not valid");

// compute signature

openssl_sign($data, $signature, $pkeyid, 'sha512');

// free the key from memory

openssl_free_key($pkeyid);

echo base64_encode($signature) . "\n";

?>

Tests:

Private key for all tests:

-----BEGIN RSA PRIVATE KEY-----

MIICXgIBAAKBgQDHikastc8+I81zCg/qWW8dMr8mqvXQ3qbPAmu0RjxoZVI47tvs

kYlFAXOf0sPrhO2nUuooJngnHV0639iTTEYG1vckNaW2R6U5QTdQ5Rq5u+uV3pMk

7w7Vs4n3urQ6jnqt2rTXbC1DNa/PFeAZatbf7ffBBy0IGO0zc128IshYcwIDAQAB

AoGBALTNl2JxTvq4SDW/3VH0fZkQXWH1MM10oeMbB2qO5beWb11FGaOO77nGKfWc

bYgfp5Ogrql4yhBvLAXnxH8bcqqwORtFhlyV68U1y4R+8WxDNh0aevxH8hRS/1X5

031DJm1JlU0E+vStiktN0tC3ebH5hE+1OxbIHSZ+WOWLYX7JAkEA5uigRgKp8ScG

auUijvdOLZIhHWq7y5Wz+nOHUuDw8P7wOTKU34QJAoWEe771p9Pf/GTA/kr0BQnP

QvWUDxGzJwJBAN05C6krwPeryFKrKtjOGJIniIoY72wRnoNcdEEs3HDRhf48YWFo

riRbZylzzzNFy/gmzT6XJQTfktGqq+FZD9UCQGIJaGrxHJgfmpDuAhMzGsUsYtTr

iRox0D1Iqa7dhE693t5aBG010OF6MLqdZA1CXrn5SRtuVVaCSLZEL/2J5UcCQQDA

d3MXucNnN4NPuS/L9HMYJWD7lPoosaORcgyK77bSSNgk+u9WSjbH1uYIAIPSffUZ

bti+jc1dUg5wb+aeZlgJAkEAurrpmpqj5vg087ZngKfFGR5rozDiTsK5DceTV97K

a3Y+Nzl+XWTxDBWk4YPh2ZlKv402hZEfWBYxUDn5ZkH/bw==

-----END RSA PRIVATE KEY-----

Test 1:

=====

Line to sign:

BYPUS6CJE 3CMCRgEm8HVz3DrWaCCid3vAANE42jcEv9 1

Generated signature:

eud5XV/84oMU6FL+aqhKrorlDwN96q27upqHbpyYkwsMHT6PYbONHspv3m4f1zvmi1miE08NUor7kCxNwoJszsoLa7eiKdoL0XtpDCeXTVuDH2MG4ZiNUOvdJ0TD15E3n97r4iKYMfOY6hzANUCmblI/A9n/PyLypdB4xKnVGnk=

Test 2

=====

Line to sign:

BG2UJ7QE7 3CMCRgEm8HVz3DrWaCCid3vAANE42jcEv9 1

Generated signature:

R7vxhZb8vq+VEZ80MyqIPG9wvQ/7ImHGx8PolxDDiTuG8h4WLQkSAen+vEdoq+shbJEyjfSSuu/z+DulyrvwMvAkGUFwEF2CWVEg1ieJd4SOSpCSjBqaJ2kuKExyzM9cRuZFEMhp5GPaO2JbRsyyoBrS4aURhzqHvQciA2wZeho=

Test 3

=====

Line to sign:

BP4VSFKYF 1BittyL1D1AuiZDjKwQVhM7trpZME55uzm 2

Generated signature:

jOUYUyBSk6etRwsP8Cme3reOKxdlUSTw3zHoo3aEvcNJvwHpq+2Tz24wdUqzqNENLca/OOOyQC8R25oCGD3IoHSIhJfDvf5Mv03Ii+panHIuDiD5YV3AfR03DpkmzbFkUAGqVe+Bu2z7x1nFDQkvLfab7+fq8WYQnMt3Vardv/U=

Taidot: C# -ohjelmointi, PHP

Näytä lisää: convert php code python, convert php code aspnet, convert php code dot net, convert python to c#, php and c# integration, python to php converter, convert c to php, online code converter, tool to convert php code to c# online, peachpie, convert javascript to c# tool online, convert PHP code, convert php code html, convert php code vbnet, md5 sha1 convert php code, convert php code cnet code, convert php code joomla, convert php code net, convert php code php, convert php code vb net online

Tietoa työnantajasta:
( 6 arvostelua ) Yilan, Taiwan

Projektin tunnus: #19765880

Myönnetty käyttäjälle:

indilo53

Hello, I have something working on UWP without dependencies. Sample results: {"version":1,"reference":"BYPUS6CJE","btcaddress":"3CMCRgEm8HVz3DrWaCCid3vAANE42jcEv9","updateID":2} eud5XV/84oMU6FL+aqhKrorlDwN96q27u Lisää

$133 USD 0 päivässä
(2 Arvostelua)
2.1

27 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

sopholos

Hi. I'm worked before with signing and encryption. Please clarify what did you want to do in UWP in this project? I think this code better to convert to console application, nothing to do here with UI at all. Maybe you Lisää

$250 USD 14 päivässä
(27 arvostelua)
6.6
hawkscodeaus

Hi, I can start work on your project immediately once you confirm me and I am also open for further discussion if you want. I have 8+ years in web design & development with good experience in following skills ... Lisää

$150 USD 3 päivässä
(114 arvostelua)
7.4
Kartoos

hi...i have read the php code and i canc convert this into c# in few hours....thanks for sharing so much detauls including test cases

$88 USD 1 päivässä
(123 arvostelua)
6.8
KGeorgy

Hello, I am pleasure with your job for Convert PHP code to C#. Thank you for the job posting. It’s a pleasure to meet you. I’d really like to work with you on this one if possible! I do have a couple of questions, but Lisää

$140 USD 7 päivässä
(42 arvostelua)
6.1
DevStar925

Hi, Dear Employer! How are you? I am really interested in your project. I have enough experience on python, C/C++, C#, java,My SQL programming. I am 100% sure i can satisfy your requirements perfectly. User-Friendly I Lisää

$140 USD 7 päivässä
(23 arvostelua)
6.2
akweb2015

Hi, I can make UWP which clones php code to c#. I can make UWP which clones php code to c#. I can make UWP which clones php code to c#.

$222 USD 3 päivässä
(7 arvostelua)
5.0
ankitbagre2000

Hey, employer. I already have read your description carefully. I have 5+ years enough experience in website development. My major skill are HTML5, CSS3, JavaScript, JQuery, Bootstrap, MySQL etc. I am reliable fr Lisää

$145 USD 3 päivässä
(28 arvostelua)
4.7
deepthi2889

Hi, I am a Full stack developer in Microsoft technologies. I have worked extensively with digital signatures. You can check the reviews in my profile to confirm this. My area of expertise is web application develop Lisää

$250 USD 1 päivässä
(18 arvostelua)
4.8
fivestar10

✔ Web/PHP/Javascript/Web Design/,NET ✔ Software Architecture Hi! Web expert. I have much experience in Web, php, javascript, html, Java, C, C++, C#, Qt, Python. We can success if we work together. Choosing good freelan Lisää

$140 USD 7 päivässä
(15 arvostelua)
4.6
bluebear1888

I am web and app program Expert who knows the value of time, very hard working and always delivers the work on time. My Motive is to make my employer to feel the greatest satisfaction with low price. If you want to dev Lisää

$150 USD 3 päivässä
(19 arvostelua)
4.5
mdramindz

Hello, Please message me so we can discuss on that. Please view the profile to see more works of mine. Let's discuss so I can provide you more details about me. Waiting for Your Reply soon. Regards, Mousumi

$99 USD 3 päivässä
(14 arvostelua)
4.7
rp07364

Hi there, I am a PHP developer having more than 4+ years of experience Magento.I am providing services in website design and development in (PHP/WordPress/Codeigniter/Laravel/Joomla/Magento/Drupal) Technaologies. M Lisää

$188 USD 3 päivässä
(8 arvostelua)
4.2
BestService222

Hi, Nice to meet you. I am very interested and available to do your project. Your required task actually map on my high skill sets. Please give me an opportunity to show my expertise in the same. I would like to Lisää

$140 USD 3 päivässä
(7 arvostelua)
4.2
TechnicalKnight

I have the code ready. Contact me so that I can share you the [login to view URL] over chat and lets finish this.

$50 USD 1 päivässä
(20 arvostelua)
4.2
phantom1222

Dear sir. I have read your description with great interest. I have experiences with lots of project. Also I am able to finish the task in time. If you send me a message, we can discuss more. I am waiting for your r Lisää

$200 USD 7 päivässä
(2 arvostelua)
3.1
Irina20100101

Hello,sir I have just read your description carefully. I am interested in your project...I have wealthy experience in Web development. I have rich experience in C# and I will make the product you are satisfied with. An Lisää

$100 USD 2 päivässä
(4 arvostelua)
2.8
INDOGICSOLUTIONS

***EXPERTISE IN C# PRGRAMMING,ASP.NET,MVC,VB.NET AND READY FOR LIVE INTERVIEW*** With over 12 years of producing corporate marketing projects for some of the most innovative companies in world, I’m here to bring your Lisää

$250 USD 7 päivässä
(2 arvostelua)
2.6
kostya1207

Hi !!!, thanks for your posting. I read carefully your request. I have already had enough experience for working your CONVERT project. If only you contact with me, you could see my ability and experience. Best regards. Lisää

$140 USD 3 päivässä
(4 arvostelua)
2.3
albertpopov46

Hi,Dear. I have many development experiences,getting work about . As I am interested in your project,I want to do work it. I've read the project description and definitely can develop your task. If you hire me, I wil Lisää

$140 USD 7 päivässä
(1 arvostelu)
2.0
theukwebexpert

Hello there! My name is Chris, I'm a UK based and native English speaking web developer and app expert with 10 years experience building and maintaining complex web apps and websites. I've built and maintained applic Lisää

$250 USD 7 päivässä
(2 arvostelua)
1.4