You might be missing a semicolon at the end of an assignment.
You might need to preallocate a variable for performance reasons.
Note that due to the laws of the United States, we can only talk in vague generalities about encryption and decryption code. If the topic were nearly anything else we would ask to see your code, but for this one topic we have to tell you not to post your code.