Convert java code to C# .NET

Closed Posted Sep 2, 2011 Paid on delivery
Closed Paid on delivery

import [login to view URL];

import [login to view URL];

import [login to view URL];

public class ClientAuthentication

{

static MessageDigest messageDigest;

private static int index = 0;

private static final char[] toHex = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };

public static void init()

{

try

{

messageDigest = [login to view URL]("MD5");

}

catch (Exception e)

{

}

}

public static String generateCnonce()

{

Date date = new Date();

long time = [login to view URL]();

Random rand = new Random();

long pad = [login to view URL]();

String nonceString = new Long(time).toString() + new Long(pad).toString();

byte[] mdbytes = [login to view URL]([login to view URL]());

return toHexString(mdbytes);

}

public static String toHexString(byte[] b) {

int pos = 0;

char[] c = new char[[login to view URL] * 2];

for (int i = 0; i < [login to view URL]; i++) {

c[(pos++)] = toHex[(b[i] >> 4 & 0xF)];

c[(pos++)] = toHex[(b[i] & 0xF)];

}

return new String(c);

}

public static String generateResponse(String username, String nonce, String cnonce, String password)

{

String realm = "[login to view URL]";

String A1 = username + ":" + realm + ":" + password;

String A2 = "sansay-the-master-of-voip";

byte[] mdbytes = [login to view URL]([login to view URL]());

String HA1 = toHexString(mdbytes);

mdbytes = [login to view URL]([login to view URL]());

String HA2 = toHexString(mdbytes);

String KD = HA1 + ":" + nonce;

KD = KD + ":" + cnonce;

KD = KD + ":" + HA2;

mdbytes = [login to view URL]([login to view URL]());

String mdString = toHexString(mdbytes);

return mdString;

}

}

Ax this project

.NET C# Programming Java

Project ID: #1192808

About the project

20 proposals Remote project Active Oct 3, 2011

20 freelancers are bidding on average $30 for this job

Fenrir32

It's ready. Check pmb please.

$30 USD in 0 days
(84 Reviews)
7.5
it2051229

Hi, kindly check your inbox for my inquiries. Thanks.

$30 USD in 0 days
(1224 Reviews)
7.8
kevinxiaozi

Dear sir, I am strong in java and C# programming especially in cryptography algorithm such as hash, signature, encryption and decryption. I have implemented them in java and C# and I am familiar with them because my More

$30 USD in 0 days
(28 Reviews)
5.4
Peterpay

i can do this asap

$30 USD in 0 days
(12 Reviews)
4.9
abbie3290

Lets start.

$30 USD in 1 day
(20 Reviews)
4.7
deadhunt

Hi, I'm java programmer. Please check PMB. Thanks.

$30 USD in 1 day
(39 Reviews)
4.9
gaddas86

Hello! I'm C# and Java coder. Can easily convert this source to c#.

$30 USD in 1 day
(24 Reviews)
4.2
HardikR

Please check pm.

$30 USD in 0 days
(3 Reviews)
3.2
thequyen

Hi, I have 5 years of experience in software development windows with C#. I'm very excited about this project, hopefully soon be able to participate ...

$30 USD in 1 day
(5 Reviews)
3.1
prafullgoyal

============Please SEE PMB=============

$30 USD in 1 day
(2 Reviews)
3.0
barneycoder

Hi, I can work on this project. Its a very simple one. Check your PM for further details. Thanks, Barney

$30 USD in 1 day
(2 Reviews)
2.1
sanjuintelligo

i am an expert programmer in C#.net and java. i can convert the given code

$30 USD in 1 day
(0 Reviews)
0.0
Sashalami

Hi Iam very interested in this work. I can complete it within a day. Please check your inbox for more details.

$30 USD in 0 days
(0 Reviews)
1.4
medasept

Hello, I done this task for you. I checked performance with a fixed date and a fixed random pad. I can show at your request a working demo. Now i go to sleep, so if you agree I will be available to send you sources fro More

$30 USD in 0 days
(0 Reviews)
0.0
GeekOnBoard

Please consider me for this assignment, I've prior experience on encryption strategies

$35 USD in 1 day
(0 Reviews)
0.0
krishnasaie

I can convert the code to c#.

$30 USD in 10 days
(0 Reviews)
0.0
fmdev

Greetings, let me know how can I help you. Thanks.

$30 USD in 1 day
(0 Reviews)
0.0
Sholdorf

I am a 40 hrs. a week full-time software engineer. I am looking for an extra 10 - 15 hrs. per week evenings and weekends work. As you can see from my profile and test scores I am well qualified. Google my name on the i More

$30 USD in 3 days
(0 Reviews)
0.0
zizo0003

Good experience in C#. Check your inbox.

$30 USD in 0 days
(0 Reviews)
0.0