ensure EOF is detected correctly (no fatal exception, that's just the normal potential return status, for example when EOF padding is reached in the decrypted resource)