Internet Checksum (Java)

Problem Definition: Write a program in Java to calculate the Internet Checksum and verify it at the Sender’s & Receiver’s side. import java.util.Scanner; class Checksum{ public static void main(String args[]){ Scanner sc = new Scanner(; System.out.println(“**********SENDER**********”); System.out.print(“Enter the word: “); String input = sc.nextLine(); //Calculation of hex string String hex[]; if(input.length()%2 == 0){ //Even length input hex = new String[input.length()/2]; for(int i=0;i<hex.length;i++) hex[i] = Integer.toHexString(input.charAt(2*i))+Integer.toHexString(input.charAt(2*i+1)); }else{//odd … Continue reading Internet Checksum (Java)