Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can anyone help with vfpencryption71.fll?
Message
De
06/03/2013 16:06:01
 
 
À
02/03/2013 08:17:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01567286
Message ID:
01567657
Vues:
58
Gregory,

May I trouble you again? I need to run the decrypt alone. Using your example the value for cStringtoUnencrypt would be "94342CF4186BC23839A8665A713C59E0"

In the example what would the syntax be to decrypt?
set library to vfpencryption71.fll additive
	
	local	cStringtoEncrypt, ;
			cSecretKey, ;
			nEncryptionType, ;
			nKeySize, ;
			nEncryptionMode, ;
			nPaddingType, ;
			nBlockSize, ;
			cIV
		
	&& Encrypt
	cStringtoEncrypt = '915-555-1212'
	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 = ENCRYPT(m.cStringtoEncrypt, m.cSecretKey, m.nEncryptionType, m.nEncryptionMode, m.nPaddingType, m.nKeySize, m.nBlockSize, m.cIv)
	
	? len(m.encryptedValue), strconv(m.encryptedValue,15)
	
*!* Added to capture EncryptedValue
	_cliptext = strconv(m.encryptedValue,15)   &&"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, '  ', m.decryptedValue == cStringtoEncrypt 
	
	
I get various errors including not enough memory to run this operation.

Thanks again,

dg
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform