Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
273 B · 17 lines
Go
123456789101112131415161718package c2patypes
import ( "crypto" "crypto/rand" "crypto/sha256")
type CallbackSigner struct { signer crypto.Signer}
func (c *CallbackSigner) Sign(data []byte) ([]byte, error) { digest := sha256.New().Sum(data)
return c.signer.Sign(rand.Reader, digest, nil)}