plastix Posted March 14, 2006 Share Posted March 14, 2006 (edited) Hi all.Complete scripting (autoit + others) newbie. Sorry I am experimenting with easybyte's cryptocx6 encryption DLL.The dll comes with a demo application which can encypt / decrypt test strings etc in VBI can see how to call the relevant function within the DLL, but don't know how to send the relevant parameters to it...In VB, to set up the parameters etc, the functions needs (for example):Dim Crypt As New EasyByte_Software.Cryptocxv6Crypt.LicenseKey = "DEMO"Crypt.InputText = "String to encrypt"Crypt.Password = "thepassword"; The encryption function is 'AESStringEncrypt'txtResult = Crypt.AESStringEncryptAny pointers on how to set these parameters correctly (I don't know the method reference numbers - and there is nothing in the documentation)...Any help greatly appreciated. CheersI don't think i can attach the DLL to the post - although I can't see the author's website stating the DEMO version cannot be distributed... just incase better not.The trial version is here - hope that helps. Edited March 14, 2006 by plastix Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 14, 2006 Moderators Share Posted March 14, 2006 Hi all.Complete scripting (autoit + others) newbie. Sorry I am experimenting with easybyte's cryptocx6 encryption DLL.The dll comes with a demo application which can encypt / decrypt test strings etc in VBI can see how to call the relevant function within the DLL, but don't know how to send the relevant parameters to it...In VB, to set up the parameters etc, the functions needs (for example):; Crypt is the encryption objectCrypt.LicenseKey = "DEMO"Crypt.InputText = "String to encrypt"Crypt.Password = "thepassword"The encryption function is 'AESStringEncrypt'Any pointers on how to set these parameters correctly (I don't know the method reference numbers - and there is nothing in the documentation)...Any help greatly appreciated. CheersYou'll find others willing to help that have knowledge of the DLL information, if they don't have to go hunt down the DLL. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
w0uter Posted March 14, 2006 Share Posted March 14, 2006 since it has OCX in the name i assume it is an object use it something like this $o_Crypt = ObjCreate("EasyByte_Software.Cryptocxv6") My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
plastix Posted March 14, 2006 Author Share Posted March 14, 2006 (edited) thanks for reply.i have registered the 'crypt.DLL'. $o_Crypt = ObjCreate("EasyByte_Software.Cryptocxv6")$o_Crypt.LicenseKey = "DEMO"$o_Crypt.Password = "password"$o_Crypt.InputText = "This is the string"How do i execute the function "AESStringEncrypt" to capture the return ?$result = $o_Crypt.AESStringEncrypt produces errorsInfact, there is a more complex VB set up that would be nice to know how to syntax etc in Auto-It:Dim Crypt As New EasyByte_Software.Cryptocxv6Call Crypt.License( "licensekey" )Dim txtSource As VariantDim txtDest As VariantSet Crypt.EncryptionMethod = New CryptRijndaelEncryptionMethodtxtSource = "This is the data to encrypt"On Error Resume NextCall Crypt.EncryptionMethod.SetSecretKeyFromPassPhrase("This is a weak pass phrase!", 128)txtDest = Crypt.Encrypt(txtSource, True)Of course both 'EasyByte_Software.Cryptocxv6' & 'CryptRijndaelEncryptionMethod' are objects... from your last pointer i can see how to substantiate an object, but i don't see any reference to how to SET the property of the 'EasyByte_Software.Cryptocxv6' to a NEW EncryptionMethod etc...What are the "CALL" / "SET" equivalents... and how can the 'Set Crypt.EncryptionMethod = New CryptRijndaelEncryptionMethod' line be coded ?I appreciate this is running before crawling for me, but I like to jump in at the deep end... I have looked in the CHM helpfile without much luck.Many thanks again Edited March 15, 2006 by plastix Link to comment Share on other sites More sharing options...
plastix Posted March 17, 2006 Author Share Posted March 17, 2006 (edited) Don't like to bump messages... but technically this is what i'm doing (sorry )Looking into using external DLL for any heavy duty processing - i'd prefer to use Auto-It primarily rather than fiddle with VB primarily and use Auto-itX secondarily...Can anyone "translate" this VB into an equivalent set of calls in Auto-It... can't seem to make it work out... I have the DLL in the script folder, but can also register it if required.REGISTER DLL:$file = "" & @ScriptDir & "\XceedCry.dll"RunWait('Regsvr32 /s "' & $file & '"')Documented Call...Dim xEnc As New XceedEncryptionCall xEnc.License( "your license key" )Dim vaSource As VariantDim vaDest As VariantSet xEnc. EncryptionMethod = New XceedRijndaelEncryptionMethodvaSource = "This is the data to encrypt"On Error Resume NextCall xEnc. EncryptionMethod.SetSecretKeyFromPassPhrase("This is a weak pass phrase!", 128)vaDest = xEnc.Encrypt(vaSource, True)All help greatly appreciated. Cheers PS - again. don't think i'm allowed to attach the trial DLL. Sorry Edited March 17, 2006 by plastix Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now