GODT-1754: Add logs for unilateral updates and SEARCH.

This commit is contained in:
Jakub
2022-08-02 12:39:48 +02:00
parent bdb35f1c1d
commit 9bb16dec48
9 changed files with 112 additions and 73 deletions

View File

@ -18,8 +18,7 @@
package message
import (
"crypto/sha256"
"encoding/hex"
"github.com/ProtonMail/proton-bridge/v2/pkg/algo"
)
type boundary struct {
@ -31,13 +30,6 @@ func newBoundary(seed string) *boundary {
}
func (bw *boundary) gen() string {
hash := sha256.New()
if _, err := hash.Write([]byte(bw.val)); err != nil {
panic(err)
}
bw.val = hex.EncodeToString(hash.Sum(nil))
bw.val = algo.HashHexSHA256(bw.val)
return bw.val
}