Actually my project is Encryption of message at the sender site and Decryption at the receiver side. There is no problem at the sender side, but at the receiver side it is creating issues. The normal code for encryption and decryption is perfect, but the problem arises with the tcpip at the receiver. The decryption of the message at the sender side is not same when using the tcpip, but without using the tcpip the decryption is perfect. The message encrypted appears perfectly at the receiver side but problem arises afterwards as the decryption is not perfect and throwing error as unsuccessful read.
at sender:
t=tcpip('0.0.0.0',30000,'NetworkRole','Server');t.OutputBufferSize=5000;fopen(t);fprintf(t,'%s\n',out3);fwrite(t,h);fwrite(t,st);
at receiver:
t=tcpip('LocalHost',30000,'NetworkRole','Client','TimeOut',3);t.InputBufferSize=5000;fopen(t);nam=fscanf(t)b1=fread(t);
please help me with this.
Best Answer