[#197] sdk: Rename getters of Signature type

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-16 11:19:03 +03:00 committed by Alex Vanin
parent 2bcbd48972
commit 2afc684313
3 changed files with 9 additions and 9 deletions

View file

@ -119,7 +119,7 @@ func VerifyIDSignature(obj *Object) error {
func() ([]byte, []byte) {
sig := obj.GetSignature()
return sig.GetKey(), sig.GetSign()
return sig.Key(), sig.Sign()
},
)
}

View file

@ -51,18 +51,18 @@ func TestVerificationFields(t *testing.T) {
},
{
corrupt: func() {
obj.GetSignature().GetKey()[0]++
obj.GetSignature().Key()[0]++
},
restore: func() {
obj.GetSignature().GetKey()[0]--
obj.GetSignature().Key()[0]--
},
},
{
corrupt: func() {
obj.GetSignature().GetSign()[0]++
obj.GetSignature().Sign()[0]++
},
restore: func() {
obj.GetSignature().GetSign()[0]--
obj.GetSignature().Sign()[0]--
},
},
}

View file

@ -19,8 +19,8 @@ func NewSignature() *Signature {
return NewSignatureFromV2(new(refs.Signature))
}
// GetKey sets binary public key.
func (s *Signature) GetKey() []byte {
// Key sets binary public key.
func (s *Signature) Key() []byte {
return (*refs.Signature)(s).GetKey()
}
@ -29,8 +29,8 @@ func (s *Signature) SetKey(v []byte) {
(*refs.Signature)(s).SetKey(v)
}
// GetSign return signature value.
func (s *Signature) GetSign() []byte {
// Sign return signature value.
func (s *Signature) Sign() []byte {
return (*refs.Signature)(s).GetSign()
}