code: func (*CredRequest) Verify(credentialRequest []byte, ipk handlers.IssuerPublicKey, nonce []byte) (err error) {
  	defer func() {
  		if r := recover(); r != nil {
  			err = errors.Errorf("failure [%s]", r)
  		}
  	}()
  
  	credRequest := &cryptolib.CredRequest{}
  	err = proto.Unmarshal(credentialRequest, credRequest)
  	if err != nil {
  		return err
  	}
  
  	iipk, ok := ipk.(*IssuerPublicKey)
  	if !ok {
  		return errors.Errorf("invalid issuer public key, expected *IssuerPublicKey, got [%T]", ipk)
  	}
  
  	err = credRequest.Check(iipk.PK)
  	if err != nil {
  		return err
  	}
  
  	// Nonce checks
  	if len(nonce) != cryptolib.FieldBytes {
  		return errors.Errorf("invalid issuer nonce, expected length %d, got %d", cryptolib.FieldBytes, len(nonce))
  	}
  	if !bytes.Equal(nonce, credRequest.IssuerNonce) {
  		return errors.Errorf("invalid nonce, expected [%v], got [%v]", nonce, credRequest.IssuerNonce)
  	}
  
  	return nil
  }
docs: // Verify checks that the passed credential request is valid with the respect to the passed
  // issuer public key.