code: func (s *X509Signer) Sign(ctx context.Context, blob []byte) ([]byte, error) {
  	if err := s.Validate(); err != nil {
  		return nil, err
  	}
  
  	var hashFunc crypto.Hash
  	switch s.algo {
  	case x509.SHA256WithRSA:
  		hashFunc = crypto.SHA256
  	default:
  		panic("someone forgot to implement hashing algo for new kind of a key")
  	}
  
  	h := hashFunc.New()
  	h.Write(blob)
  	digest := h.Sum(nil)
  
  	return s.pkey.Sign(cryptorand.Get(ctx), digest, hashFunc)
  }
docs: // Sign signs a blob using the private key.