getting java.security.NoSuchAlgorithmException: MD4 MessageDigest not available for java 17

324 Views Asked by At

I'm facing the exception java.security.NoSuchAlgorithmException: MD4 MessageDigest not available.

I'm using the library in java 17 and gradle - implementation group: 'com.hierynomus', name: 'smbj', version: '0.9.1'

Any suggestions or guidance is appreciated.

1

There are 1 best solutions below

1
Stephen C On BEST ANSWER

This is a bug in smbj; see https://github.com/hierynomus/smbj/issues/425. According to the issue updates, a fix has been committed and is included in smbj release 0.12.2.

Solution: upgrade your dependency.

(FWIW, 0.9.1 is nearly 5 years out of date ... at the time of writing this.)


For those (like me) whose initial reaction was "but MD4 is insecure", there are a few protocols where MD4 is still used. SMB appears to be one of them.