You don't tell us what's happening, or in which line of code it's happening, but usually this exception is caused by treating encrypted data (which is binary data) as character data (by storing it in a String object). The code seems to be doing exactly that.
Post by:autobot
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, that will fit in a stocking