After changing the calcHash API configuration, the decrypt function is returning an error even when the correct passphrase is entered. There seems to be nothing wrong with the hashing computation itself but there could possibly be an issue with the data being returned by calcHash not liked by the decrypt function.