service: implement a function for creating and storing a signature

This commit is contained in:
Leonard Lyubich 2020-05-04 19:33:18 +03:00
parent 0ffb1bd61d
commit f3e6caf7e7
3 changed files with 59 additions and 0 deletions

View file

@ -1,5 +1,9 @@
package service
import (
"crypto/ecdsa"
)
// NodeRole to identify in Bootstrap service.
type NodeRole int32
@ -187,3 +191,9 @@ type SignedDataReader interface {
// Must behave like Read method of io.Reader and differ only in the reading of the signed data.
ReadSignedData([]byte) (int, error)
}
// SignatureKeyAccumulator is an interface of the accumulator of data signatures with keys.
type SignatureKeyAccumulator interface {
SignedDataSource
AddSignKey([]byte, *ecdsa.PublicKey)
}