code: func (p11w *Pkcs11Wrapper) SignMessageAdvanced(data []byte, key pkcs11.ObjectHandle, mechanism *pkcs11.Mechanism) (signature string, err error) {
  
  	err = p11w.Context.SignInit(p11w.Session, []*pkcs11.Mechanism{mechanism}, key)
  	if err != nil {
  		return
  	}
  
  	signatureBytes, err := p11w.Context.Sign(p11w.Session, data)
  	if err != nil {
  		return
  	}
  
  	signature = hex.EncodeToString(signatureBytes)
  
  	return
  }
docs: /* Advanced form of signing message, specify mechanism. Assume data is already prepared for mechanism (not altered in this function) */