So I have a working ftp connection and I can upload files and whatnot. However currently I'm storing the pw/user as hardcoded values (which I know isn't good) and want to see if I can hide/encrypt them somehow. I would also like to encrypt the actual ftp connection if possible as well. Any information/pointers would be great!
private int ftpProcess(String serverName, String userName, String password) {
FTPClient ftp = new FTPClient();
int statusCode = 0;
try {
ftp.connect(serverName);
// was required to add this passive mode in TC8 to connect to the mainframe
ftp.enterLocalPassiveMode();
ftp.login(userName, password);
ftp.site("filetype=jes");
submitJcl(ftp, "submitTest.txt", serverName);
ftp.quit();
} catch (Exception e) {
logger.error(e);
statusCode = 3;
}
return statusCode;
}