Bear with me, I may have asked this question in a botched way.
So I need some JavaScript code that creates a signature of JavaScript that is stored in a string.
Here is an example:
presignature = "<script>alert("test")</script>;
I need this JavaScript code that is stored in presignature to be made into signature. I was thinking I could just keep on replacing the string with common uses of javascript (like changing "alert" to "a").
Any clues or tips?