forked from TrueCloudLab/frostfs-sdk-go
ea043f4ca3
Remove `signature` and `util/signature` packages. Re-implement their functionality in new `crypto` package. Generalize the approach of digital signature computation and verification by adding `Signer` and `PublicKey` primitives similar to standard `crypto` package. Support already exising in protocol signature schemes. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
16 lines
377 B
Go
16 lines
377 B
Go
package neofsecdsa
|
|
|
|
import neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
|
|
|
|
func init() {
|
|
neofscrypto.RegisterScheme(neofscrypto.ECDSA_SHA512, func() neofscrypto.PublicKey {
|
|
return new(PublicKey)
|
|
})
|
|
|
|
neofscrypto.RegisterScheme(neofscrypto.ECDSA_DETERMINISTIC_SHA256, func() neofscrypto.PublicKey {
|
|
var key PublicKey
|
|
key.MakeDeterministic()
|
|
|
|
return &key
|
|
})
|
|
}
|