Decrypt

Use this function to decrypt a block of data.

FUNCTION Decrypt(data as String) as String

Notes:
If the total size of all blocks that you encrypt is not dividable by PaddingBlockSize then you will get 1 to PaddingBlockSize-1 unencrypted bytes at the end. Because of that then you should add at least PaddingBlockSize-1 bytes of random bytes to the end of the encrypted stream to ensure that all of your data gets encrypted.

After you have finished decrypting all of the blocks then you should call FinishDecrypt which will let the decryptor clean up and it will return all untouched bytes there which should be part of the random bytes if you have done as descrbed above.