Convert java code to C# .NET
$30 USD
Pagado a la entrega
import [url removed, login to view];
import [url removed, login to view];
import [url removed, login to view];
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 = [url removed, login to view]("MD5");
}
catch (Exception e)
{
}
}
public static String generateCnonce()
{
Date date = new Date();
long time = [url removed, login to view]();
Random rand = new Random();
long pad = [url removed, login to view]();
String nonceString = new Long(time).toString() + new Long(pad).toString();
byte[] mdbytes = [url removed, login to view]([url removed, login to view]());
return toHexString(mdbytes);
}
public static String toHexString(byte[] b) {
int pos = 0;
char[] c = new char[[url removed, login to view] * 2];
for (int i = 0; i < [url removed, login to view]; 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 = "[url removed, login to view]";
String A1 = username + ":" + realm + ":" + password;
String A2 = "sansay-the-master-of-voip";
byte[] mdbytes = [url removed, login to view]([url removed, login to view]());
String HA1 = toHexString(mdbytes);
mdbytes = [url removed, login to view]([url removed, login to view]());
String HA2 = toHexString(mdbytes);
String KD = HA1 + ":" + nonce;
KD = KD + ":" + cnonce;
KD = KD + ":" + HA2;
mdbytes = [url removed, login to view]([url removed, login to view]());
String mdString = toHexString(mdbytes);
return mdString;
}
}
Ax this project
Nº del proyecto: #1192808
Sobre el proyecto
21 freelancers están ofertando un promedio de $30 por este trabajo
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 Más
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 ...
Hi, I can work on this project. Its a very simple one. Check your PM for further details. Thanks, Barney
Hi Iam very interested in this work. I can complete it within a day. Please check your inbox for more details.