How to correctly generate a hash on the server side and transfer it to the client using the standard crypto / ... library, and then at the moment when generating, through sha512, the data changes during transmission. I have this:

str := []byte("asdadasdadadssasdsdasdsas") bytes28 := md5.Sum([]byte(str)) 

Next, I send string (bytes28) to the client, then from the client I try to access the data on the server using the given hash code, but the code has changed during transportation, as a result of which the data is not selected.

  • one
    If your code changes during transportation, then probably the problem is in the method of transferring the hash in one direction or the other, so it would be nice to add data on how the hash is transmitted (and not calculated) in both directions. - Roman Khimov
  • I double Roman's comment. - Ivan Black

0