You could use the built in java crc32 functionality and implement the missing 
digest. 

https://docs.oracle.com/javase/7/docs/api/java/util/zip/CheckedInputStream.html

Sendt fra min iPhone

> 12. jan. 2018 kl. 16:31 skrev Dennis van der Laan <d.g.van.der.l...@rug.nl>:
> 
> Hi,
> 
> I made an integration between SSHD and Apache Jackrabbit, so we can upload
> content to Jackrabbit through Sftp.
> We sync contents with a synchronization client (Beyond Compare  -
> https://www.scootersoftware.com/) which sends [crc32] as a hash algorithm
> to compare the contents of files.
> I get a java.lang.IllegalArgumentException: No matching digest factory
> found for [crc32].
> In the SftpSubsystem.doCheckFileHash() I found that algorithms are checked
> against the BuiltinDigests, and [crc32] is not a builtin digest. What would
> be the best way to add a new digest for file hashing?
> 
> Thanks in advance,
> Dennis
> 
> -- 
> D.G. van der Laan, MSc
> Sr. Software Engineer, Center for Information Technology
> +31 (0)50 363 9273

Reply via email to