A client of mine is looking to add few checks/swaps in his java code.
You are required to look into a already existing solution written in C and do similar in Java.
If you understand the code below, then please place your bid.
import java.security.*;
import java.util.*;
public class HelloWorld{
public static void main(String []args){
[login to view URL]("Hello World");
calculateDW(4214, (byte) 000000001E22ANFN);
}
private static class EcmData {
byte[] P1, P2, P3, P4, CW;
boolean odd;
}
private byte[] calculateDW(int sid, EcmData ecm) {
try {
MessageDigest algorithm = [login to view URL]("MD5");
[login to view URL]();
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
byte messageDigest[] = [login to view URL]();
byte[] newDW = new byte[8];
for(int i = 0; i < 8; i++)
newDW[i] = (byte)(messageDigest[i + 8] ^ [login to view URL][i]);
//newDW[0] = messageDigest[8]
// fix DW Checksum
newDW[3] = (byte)((newDW[0] + newDW[1] + newDW[2]) & 0xFF);
newDW[7] = (byte)((newDW[4] + newDW[5] + newDW[6]) & 0xFF);
//print([login to view URL](sid) + "]);
byte[] DW = new byte[16];
if([login to view URL]) [login to view URL](newDW, 0, DW, 8, [login to view URL]);
else [login to view URL](newDW, 0, DW, 0, [login to view URL]);
return DW;
} catch(NoSuchAlgorithmException e) {}
return null;
}
}
Hello Sir,
I am Bing from China,how are you!
I have lots experience on security in Java language,I understand the java code
please let me help you
Thanks
Bing
Hi,
I am a graduate in CS and working as a C++/Java programmer for 3+ years.
I have done lots of projects both in profession and in freelancer.com.
I assure you of clean, efficient code with proper comment and documentation.
thanks
First you set the MD5 as the hashing algorithm. Then you needs to processed data through update method. To do that need to set P1, P2,.. as byte[] . it can be made by Strign. getBytes(); method.
When digest() is called it start calculating hash for the P1,.. Then you can do what ever with it.
I am a java expert with more than 6 years of industrial experience.
I worked for Fast Search and Transfer.
Dear employer,
I can proceed with the re-writing of the code from c to Java as per your requirement. I've extensive experience in java. Please send in more details to proceed with the project. I'm just putting a timeline but the actual time might vary depending on the analysis of the actual requirement.
I'm ready to start working on the project. Looking forward to working with you. Awaiting a positive reply from you.
Thanking you
Shaik Allabakash.
Hello Hiring Manager!
i am a university graduate and have done graduation in computer sciences from the prestigious university of pakistan.
i have 4 years of an experience in php, java, jquery, ajax, html, css , c and c++.
i have developed an expert system in java programming and know java very well.
i have also done 1 job over here at freelancer in c++, and gave presentation to my client and he was really impressed with my work.
i understand the code very well written below and can easily convert the code into java.
i am looking for your response so that you share your code with me and i can start working on that.
thanks
Hi
Thanks for posting the project. I am a Java expert and I can surely help you here. I went through the code you shared, I am very much confident to provide you the solution. Please let me know the if you are interested so that we can further discuss on the requirements.
Thanks
Hi,
I am good in java/J2ee, had done lots of projects successfully. Having 9+years of experience in java/j2ee technology I can provide you a quality and optimized solution within time. also i can take care of the enhancement if any come after delivery.
Hope to hear from you soon,
Thanks,
Saurav