Thank you Stefan, for the quick reply.
I had a look at the digest package indeed, showing me the BuiltinDigests
enum. What you're saying is that the only way to add another file check
hash digest is to alter the code of BuiltinDigests and add a crc32 digest?
I would only do that if the community is willing to take over the code,
because I do not want to manage my own version of SSHD.

Regards,
Dennis

On Fri, Jan 12, 2018 at 5:39 PM, Stefan Magnus Landrø <
stefan.lan...@gmail.com> wrote:

> 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
>



-- 
D.G. van der Laan, MSc
Sr. Software Engineer, Center for Information Technology
+31 (0)50 363 9273

Reply via email to