Hashing multiple byte[]'s together into a single hash with C#?

前端 未结 6 1074
生来不讨喜
生来不讨喜 2020-12-16 17:54

I have three fields: string Title, byte[] Body, and byte[] Data, from which I want to calculate a single hash as a check to be sure th

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 18:29

    You have to combine them all in a single variable and then calculate the MD5 Hash. I don't see any shortcut there.

    You see, most of solutions proposed here just try either to run multiple commands on the same line ("one liners") or implement something to "under the hood" combine your fields and then Hash...

提交回复
热议问题