Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can anyone help with vfpencryption71.fll?
Message
From
07/03/2013 07:21:58
 
 
To
07/03/2013 05:34:59
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01567286
Message ID:
01567696
Views:
58
>>I get various errors including not enough memory to run this operation.
>>
>>Thanks again,
>>
>>dg
>
>I get the same error if I keep the hex value of the encryptedValue - see function DecryptionTestError() below
>
>encryptedValue = "94342CF4186BC23839A8665A713C59E0"
>
>
>Should be
>
>encryptedValue = strconv("94342CF4186BC23839A8665A713C59E0",16)
>
>
>Bear in mind that in the original function I used strconv(m.encryptedValue,15) to display the encrypted value
>No where do you see that I used the hex presentation of the encryptedValue to decrypt
>
>
>*_______________________________________________________________________________
>function DecryptionTestError()
>
>	set library to D:\tmp\In\vfpencryption90\vfpencryption.fll additive
>	
>	local	;
>			cSecretKey, ;
>			nEncryptionType, ;
>			nKeySize, ;
>			nEncryptionMode, ;
>			nPaddingType, ;
>			nBlockSize, ;
>			cIV
>		
>	&& Encrypt
>
>	nEncryptionType = 2 && or 0 or 1
>	
>	do case
>	case m.nEncryptionType == 0
>		nKeySize = 16
>	
>	case m.nEncryptionType == 1
>		nKeySize = 24
>	
>	case m.nEncryptionType == 2
>		nKeySize = 32
>	
>	otherwise
>		error 'unknown nEncryptionType '
>	
>	endcase
>	
>	cSecretKey = padr('MyKey', m.nKeySize, chr(0))
>	
>	nEncryptionMode = 1 && CBC - we will need an IV
>	
>	nPaddingType = 4 && ISO 10126
>
>	nBlockSize = 16 && or 24 or 32
>	
>	cIV = replicate(chr(0), m.nBlockSize) && Can be anything - but nBlockSize long
>	
>	local encryptedValue
>	
>	encryptedValue = "94342CF4186BC23839A8665A713C59E0"
>	
>	
>	local decryptedValue
>	
>	decryptedValue= Decrypt(m.encryptedValue, m.cSecretKey, m.nEncryptionType, m.nEncryptionMode, m.nPaddingType, m.nKeySize, m.nBlockSize, m.cIv)
>	
>	? len(m.decryptedValue), m.decryptedValue
>
>endfunc
>*_______________________________________________________________________________	
>
My bad, I overlooked that. Thanks for your patience and support!

dg
Previous
Reply
Map
View

Click here to load this message in the networking platform