forked from TrueCloudLab/frostfs-sdk-go
[#190] crypto: Provide fmt.Stringer
of the Scheme
type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2f9cc50fec
commit
bcbffd516a
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,8 @@ package neofscrypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Scheme represents digital signature algorithm with fixed cryptographic hash function.
|
// Scheme represents digital signature algorithm with fixed cryptographic hash function.
|
||||||
|
@ -17,6 +19,11 @@ const (
|
||||||
ECDSA_DETERMINISTIC_SHA256 // Deterministic ECDSA with SHA-256 hashing (RFC 6979)
|
ECDSA_DETERMINISTIC_SHA256 // Deterministic ECDSA with SHA-256 hashing (RFC 6979)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// String implements fmt.Stringer.
|
||||||
|
func (x Scheme) String() string {
|
||||||
|
return refs.SignatureScheme(x).String()
|
||||||
|
}
|
||||||
|
|
||||||
// maps Scheme to blank PublicKey constructor.
|
// maps Scheme to blank PublicKey constructor.
|
||||||
var publicKeys = make(map[Scheme]func() PublicKey)
|
var publicKeys = make(map[Scheme]func() PublicKey)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue