Re: crypting algorithm
You do not have to encrypt the password at all:
https://winscp.net/eng/docs/custom_distribution#distributing_passwords
https://winscp.net/eng/docs/custom_distribution#distributing_passwords
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.