One of the issues is that the doFinal function calculates only the correct SHA256 the first time. After that, the hashes are wrong. The problem is that the state variables of the classes are not resetted. Therefore, doFinal calculate the next hash using the wrong state values. I have fix this by adding a reset function, that resets these state variables. At the end of doFinal the reset method is called and all next hashes are correctly calculated!
One of the issues is that the doFinal function calculates only the correct SHA256 the first time. After that, the hashes are wrong. The problem is that the state variables of the classes are not resetted. Therefore, doFinal calculate the next hash using the wrong state values. I have fix this by adding a reset function, that resets these state variables. At the end of doFinal the reset method is called and all next hashes are correctly calculated!
I hope you like this fix!