mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2026-04-23 23:59:53 +08:00
imrpove log outputs
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
+6
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user