Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DECLARE and cryptoSys
Message
De
05/05/2006 14:52:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
DECLARE and cryptoSys
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01119732
Message ID:
01119732
Vues:
68
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform