I wrote the code to encode/decode Byte buffer to blowfish algorintm in CryptEngine. Everything works fine.
public class ByteArrayEncoder extends MessageToByteEnco