diff --git a/container/service.go b/container/service.go index 527377a..27f39e7 100644 --- a/container/service.go +++ b/container/service.go @@ -15,7 +15,7 @@ type ( UUID = refs.UUID // OwnerID type alias. OwnerID = refs.OwnerID - // OwnerID type alias. + // MessageID type alias. MessageID = refs.MessageID ) diff --git a/container/types.go b/container/types.go index 1ffcafe..9269f30 100644 --- a/container/types.go +++ b/container/types.go @@ -68,8 +68,8 @@ func (m *Container) Empty() bool { } // -- Test container definition -- // + // NewTestContainer returns test container. -// // WARNING: DON'T USE THIS OUTSIDE TESTS. func NewTestContainer() (*Container, error) { key := test.DecodeKey(0) diff --git a/session/types.go b/session/types.go index ceb2944..aff7cca 100644 --- a/session/types.go +++ b/session/types.go @@ -124,7 +124,7 @@ func (m *Token) Verify(keys ...*ecdsa.PublicKey) bool { return false } -// Sign adds token signatures. +// AddSignatures adds token signatures. func (t *PToken) AddSignatures(signH, signT []byte) { t.mtx.Lock() @@ -139,8 +139,7 @@ func (t *PToken) SignData(data []byte) ([]byte, error) { return crypto.Sign(t.PrivateKey, data) } -// VerifyData checks if signature of data by token t -// is equal to sign. +// VerifyData checks if signature of data by token is equal to sign. func (m *VerificationHeader) VerifyData(data, sign []byte) error { if crypto.Verify(crypto.UnmarshalPublicKey(m.PublicKey), data, sign) != nil { return ErrInvalidSignature