This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
iam trying to implement SHA1 (Secure Hash Algorithm) in java ..and i do face this problem so plz help me on : in thie algorithm i have a message that i want to calculate the hash for ...the message length must be multiple of 512 to deal with it..so i first calculate the message length in bits for example say it was 1850 bit..then i calculated the number of needed padding bits to have the message with the desired length and it was : 170 "0" bit 1 "1" bit how can i pad this bits to my message?? how could i get the 170 "0" bit or 1 "1" bit? then i must convert the length of my messge which as we said above 1850 to 64-bit unsigned integer and also pad it to my message to have finally the desired length..do i have to deal with this numbers in binary or ASCII or how can i do that???plz reply to me very important..
hi Henry thanx a lot...but this is not a homework it self iam working with a project a small part of it is using SHA1 but what u mean it is from the java core package u mean i dont need to implement it does it exist???iam very new to java so i read about shifting and bitwise but plz explain to me more what does this means to me here?plz reply in a clear way..