Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE and cryptoSys
Message
From
05/05/2006 14:52:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
DECLARE and cryptoSys
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01119732
Message ID:
01119732
Views:
69
Hi all,

I'm trying to use the cryptoSys PKI Library, but I'm facing a simple problem with the DLL. I use the following code:
*-- Get the hash of the data with cryptPKI
local lcHash as Character, lnKeyLen as Integer

declare long HASH_HexFromFile in diCrPKI.dll string sHexDigest, ;
	 long nLenHex, ;
	 string stringFile, ;
	long nOptions

lcHash = space(40)
lnKeyLen = HASH_HexFromFile(lcHash, 40, 'myFile.txt', 0)
? 'cryptPKI', lnKeyLen, lcHash
The function HASH_HexFromFile reads the file, and puts the hash into lcHash. 40 is the size of the SHA1 hash, and the last parameter (zero) is the hash method, SHA1 in this case.
The function returns OK, as it returns 40 (the size of the produced hash), but the variable lcHash is empty.
I have tryed to set lcHash by reference (although in the documentation it says is byVal), or to change lcHash to public, but it still is an empty string.

Some ideas on how to get the right results?
Thanks a lot,
Javier.
Next
Reply
Map
View

Click here to load this message in the networking platform