Home Forums .NET libraries Xceed SFTP/FTP for .NET File Integrity Check

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20938 |

    Does the FTP component support file integrity checks? For example, when a file is uploaded or downloaded, is there any way to know that the file is exactly the same on both the local and remote ends? I saw where you can check the size of the file but what if data is some how shifted around and the filesize remains the same? For binary type files, like Word documents, this would result in the file being corrupt but the filesize checks wouldn’t catch that. What would really be nice is if you could somehow hash the file before the transfer occurs and then re-hash it after the transfer. If the two hashes match, you know the file is good. Does anyone know if this is possible?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Tommy (had 3010 views)

    Xceed Support
    Member
    Post count: 5658

    Our component does not offer this kind of possibility.

    For the moment, you could compare the file sizes, but there is possibility, like you already said, that the size would be the same even if the data is not.

    An other possibility would be to calculate the CRC of a file each time you add it to your server, you keep the result and you compare it to your local file before doing the transfer.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by CharlesB (had 3650 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.