in reply to adding value to hash

I reckon that you didn't have time to read the books I recommended recently because the code still shows an embarrassing list of problems. Well, maybe you're in a lot of time trouble. But seriously: Writing so much bad code costs you a lot of time.

Before you demonstrate some progress in your skills, I think it makes no sense to explain the concepts of serialization and encoding to you. Getting these right is necessary if you want to create signatures which can be actually validated by the recipient of your form.

Good luck!