Hi! Does calling `update` on `MessageDigest` like ...
# announcements
i
Hi! Does calling
update
on
MessageDigest
like this append or overwrite the data?
Copy code
val digest = MessageDigest.getInstance("SHA-256")
digest.update("foo".toByteArray())
digest.update("bar".toByteArray())
I see in the source that
update
calls
engineUpdate(input, 0, input.length);
, which:
Copy code
/**
     * Updates the digest using the specified array of bytes,
     * starting at the specified offset.
     *
This makes me thing that it overwrites the data, but the first snippet seems to work, so I'm confused