in reply to encryption using Twofish

How about you show us a short sample script that demonstrates your problem so that we can reproduce exactly the issue you have? There are a few fuzzy areas in the description you have given so far that make it hard to know just where your real issue may lie.

True laziness is hard work