What do you mean by "encrypt a file"? If you transfer it by means of sftp the transmission would already occur in an encrypted way (basically this is what sets sftp and ftp apart). Or do you mean the recoding of the UNIX/DOS line endings? This is done by either a short
sed script, tr or unix2dos/dos2unix.
I hope this helps.
bakunin