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
*_______________________________________________________________________________ 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 *_______________________________________________________________________________