The build tool I am using has a telnet server and password encryption algorithm built in. However, the password encryption program has to be ran separately. For example, if I wanted my password "temppass" to be encrypted, I would have to manually get its encryption string by typing in a Windows cmd:

Code:
C:\> encryptapp
C:\> Enter the password to be encrypted: temppass
C:\> The encrypted password is "ab1cd2ef3"
My question is, if I made a UI in Visual C++, how can I call this encryption algorithm in the code for a button, and be able to save the encrypted string?