You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PbjBytesHasher when hashing protobuf objects it is inefficient as it has to go form PBJ protobuf object to byte[] then to MessageDigest.
Solution
PBJ serialization is stream based and so is MessageDigest. We just need to connect them together. I have filled a PBJ enhancement to add convenience method to make this easy. Once that is implemented then PbjBytesHasher can be updated to use it.
See hashgraph/pbj#271
Also as a side note PbjBytesHasher is not the most obvious name as it is very generic, PbjEventHasher would be better 😀
Alternatives
No response
The text was updated successfully, but these errors were encountered:
PbjBytesHasher is not currently being used, because it was replaced in develop by PbjStreamHasher that does not create a byte[] as an intermediary. So I think we can close this ticket
Problem
PbjBytesHasher
when hashing protobuf objects it is inefficient as it has to go form PBJ protobuf object tobyte[]
then toMessageDigest
.Solution
PBJ serialization is stream based and so is
MessageDigest
. We just need to connect them together. I have filled a PBJ enhancement to add convenience method to make this easy. Once that is implemented thenPbjBytesHasher
can be updated to use it.See hashgraph/pbj#271
Also as a side note
PbjBytesHasher
is not the most obvious name as it is very generic,PbjEventHasher
would be better 😀Alternatives
No response
The text was updated successfully, but these errors were encountered: