Section2.3.3 crypto
SecurityUtils
SecurityUtilstype SecurityUtils interface { Sign(msg []byte) ([]byte, error) Verify(peerID *pb.PeerID, signature []byte, message []byte) error }
Usage
Implement
// Sign a message with this validator's signing key
func (h *Helper) Sign(msg []byte) ([]byte, error) {
if h.secOn {
return h.secHelper.Sign(msg)
}
logger.Debug("Security is disabled")
return msg, nil
}Summary
Last updated