With FTP, I recommend checking the download, if possible.
The problem is that there is no widespread standard API for calculating checksum with FTP.
There are many suggestions for a checksum calculation command for FTP. No one has yet been accepted.
Last sentence:
https://tools.ietf.org/html/draft-bryan-ftpext-hash-02
As a result, different FTP servers support different checksum commands with different syntax. HASH, XSHA1, XSHA256, XSHA512, XMD5, MD5, XCRC, To name a few. You need to check if your FTP server supports it, if any.
WinSCP. WinSCP . checksum . , , WinSCP .
> 2015-04-28 09:19:16.558 XSHA1 /test/file.dat
< 2015-04-28 09:19:22.778 213 a98faefdb2c36ca352a2d9b01668aec6b641cf4b
, Apache Commons Net sendCommand method:
if (FTPReply.isPositiveCompletion(ftpClient.sendCommand("XSHA1", "filename"))
{
String[] reply = ftpClient.getReplyStrings();
}
( WinSCP)
- , :
- .
- (TLS/SSL) . ( ) . , , ( ), , .