A complex data hiding algorithm for secure image transmission and covert communication