(Upd: detected by the scanner behind @deepview-autofix)
Hash behavior is reasonable:
>hash=require('crypto').createHash('sha256').update('data')>hash.digest()<Buffer3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7>>hash.digest()UncaughtError[ERR_CRYPTO_HASH_FINALIZED]: DigestalreadycalledatHash.digest(node:internal/crypto/hash:155:11){code: 'ERR_CRYPTO_HASH_FINALIZED'}But HMAC, on the other hand, returns empty buffers on further .digest() calls, likely for compat reasons:
>hmac=require('crypto').createHmac('sha256','key').update('data')>hmac.digest()<Buffer5031fe3d989c6d1537a013fa6e739da23463fdaec3b70137d828e36ace221bd0>>hmac.digest()<Buffer>This is a footgun with potential security risks, and should be first runtime-deprecated, then removed if no breakage is detected.

(Upd: detected by the scanner behind @deepview-autofix)
Hash behavior is reasonable:
But HMAC, on the other hand, returns empty buffers on further
.digest()calls, likely for compat reasons:This is a footgun with potential security risks, and should be first runtime-deprecated, then removed if no breakage is detected.