I am using socket to transfer file and AES 256 to encrypt/decrypt, I use the byte array to accept file\'s content and encrypt it, but only the first byte size array success