LB Booster
General >> General Board >> Encryption
http://lbb.conforums.com/index.cgi?board=general&action=display&num=1520717936

Encryption
Post by PabloSl on Mar 10th, 2018, 8:38pm

Hello,

I am trying to use this code in LBB:

https://github.com/iversc/lb-cryptoapi-wrapper/blob/master/crypto.bas

from this thread:

http://libertybasic.conforums.com/index.cgi?board=general&action=display&num=1520645028&start=0#1520697218

I get Error, Duplicate structure with ambiguous member 'pDataLen'
at line 554 in Function CryptGetHashParam
at line 539 in Function CryptGetHashValue

Kind regards,

- Pablo

Re: Encryption
Post by RobM on Mar 11th, 2018, 05:40am

This is caused by have two structs with the same name but different data types. Change one of the names and it should work.

struct a, pDataLen as ulong
struct a, pDataLen as long
Re: Encryption
Post by Richard Russell on Mar 11th, 2018, 11:30am

on Mar 11th, 2018, 05:40am, RobM wrote:
This is caused by have two structs with the same name but different data types. Change one of the names and it should work.

Indeed. Two such similar structures, with the same name and the same member name, but one being unsigned and the other signed, seems unlikely to be deliberate:

Code:
struct a, pDataLen as ulong
struct a, pDataLen as long 

The original author should probably be informed of the anomaly in case it is a mistake.

Richard.