HI,
I have seen the reference code you are using for encryption decryption purpose,
it is using AES algo. to decrypt the code/files and according to your error only issue is that it is getting null row data to decrypt that's why it is throwing error.
this will not take much of my time to resolve.
looking forward to hear from you.
Thanks