Sign in to follow this  
Followers 0
FrenchTroll

Problem with _StringEncrypt

4 posts in this topic

Hello,

Sorry for my english but i am french...

How can we write in a inifile an encrypted password by an imputbox ?

#include <guiconstants.au3>
#include <string.au3>
      
GUICreate("test")
$input = GUICtrlCreateInput ( "", 10,  5, 100, 20, $ES_PASSWORD)
$EncryptButton = GuiCtrlCreateButton('Encrypt', 31, 54, 40, 40)

GUISetState () 

While 1
sleep(1)
$msg = GUIGetMsg()
       Select       
    Case $msg = $EncryptButton
           $pass = GuiCtrlRead($input)
           IniWrite("Conf.ini", "PASS", "Mot de passe", _StringEncrypt(0,$pass,"12345","2"))                
               ExitLoop
       EndSelect
Wend

that return only one strange letter...

THANKS

Share this post


Link to post
Share on other sites



0 is to decrypt

#include <guiconstants.au3>
#include <string.au3>
      
GUICreate("test")
$input = GUICtrlCreateInput ( "", 10,  5, 100, 20, $ES_PASSWORD)
$EncryptButton = GuiCtrlCreateButton('Encrypt', 31, 54, 40, 40)

GUISetState ()

While 1
sleep(1)
$msg = GUIGetMsg()
       Select        
    Case $msg = $EncryptButton
           $pass = GuiCtrlRead($input)
           ;IniWrite("Conf.ini", "PASS", "Mot de passe", _StringEncrypt(1,$pass,"12345","2"))  
           $encypt = _StringEncrypt(1,$pass,"12345","2")
            MsgBox(0x0,"encypted", $encypt)
            $dencypt = _StringEncrypt(0,$encypt,"12345","2")
            MsgBox(0x0,"encypted", $dencypt)
               ExitLoop
       EndSelect
Wend

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Arff...

Thanks both :rolleyes:

Edited by FrenchTroll

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0