imrpove log outputs

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-01-12 14:33:03 +01:00
parent 08f9b36b8b
commit b68d06f0c3
+6 -2
View File
@@ -32,8 +32,8 @@ type KeyPair struct {
}
type PublicKeyPair struct {
Ours Key
Theirs Key
Ours Key `json:"ours"`
Theirs Key `json:"theirs"`
}
func GeneratePrivateKey() (Key, error) {
@@ -102,6 +102,10 @@ func (k Key) IsSet() bool {
return k != Key{}
}
func (k Signature) String() string {
return base64.StdEncoding.EncodeToString(k[:])
}
func (kp PublicKeyPair) ID(key []byte) string {
ctx := hmac.New(hash.SHA512.CryptoHash().HashFunc().New, key)