how to generate SHA 256 encrypted code
Hi all,
I need your great help in imlementing a SHA 256 generator in java. Basically if given an input string something like
hn-Rw2ZH-YwllUYkklL5Zo_7lWJVkrbShZPb5CD1expires=4102448462&file_name=mario.avi&file_size=4000title=Mario
I should be able to generate an SHA-256 digest in base 64 format on this string, truncate the string to 43 characters and drop any trailing '=' signs. URI encode the signature specifically '+','=', and '/'. This example should produce a encrypted code something like
dNNtzTAzsdfGrRFJlJsBe0tF4lTxjP2CM6G7AFqtdw4
I am not really sure how can i develop this generator in java. Can you please advise.
I really appreciate your help.
Thank You
Edited by: twisai on Aug 18, 2010 6:49 AM