Sign in to follow this  
Followers 0
dabus

_HextoString-Bug?

8 posts in this topic

Share this post


Link to post
Share on other sites



Have you thought about actually Hexing the password first, befoe you try to make the Hex a string?


[center]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.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yes. (I think this should do the trick, right? )

$UserPass = _StringEncrypt(1, $UserPass, @UserName)
$UserPass = _StringToHex ($UserPass)
IniWrite($IniFile, $Drive, "UserPass", $UserPass)

Here is my script as attachment.

Edited by dabus

Share this post


Link to post
Share on other sites

Yes. (I think this should do the trick, right? )

$UserPass = _StringEncrypt(1, $UserPass, @UserName)
$UserPass = _StringToHex ($UserPass)
IniWrite($IniFile, $Drive, "UserPass", $UserPass)

Here is my script as attachment.

A bit overkill there, you'll have to do 2 things in order for that not to throw you an error again when deciphering, _HexToString() / _StringEncrypt(0) << I think it's 0 off the top of my head. But if you look at the _StringEncrypt() UDF you'll see it already uses Hex() so why the extra?

[center]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.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I just thought it may be more difficult to get the password - I am wrong, right :lmao: ?

So you think I got this error since I used this hex-stuff a little bit too often? Or does my computer need a rest ;) ?

#include <String.au3>
$UserPass = IniRead($IniFile, $Drive, "UserPass", "")
$UserPass = _HexToString ($UserPass)
Sleep ( 10)
$UserPass = _StringEncrypt(0, $UserPass, 'mbauer')
Edited by dabus

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I just thought it may be more difficult to get the password - I am wrong, right :lmao: ?

So you think I got this error since I used this hex-stuff a little bit too often? Or does my computer need a rest ;) ?

#include <String.au3>
$UserPass = IniRead($IniFile, $Drive, "UserPass", "")
$UserPass = _HexToString ($UserPass)
Sleep ( 10)
$UserPass = _StringEncrypt(0, $UserPass, 'mbauer')
Well _StringEncrypt() will hex to several levels that you can set within the UDF itself, and also be able to UnEncrypt because you used that specifically, I just think it's a bit of overkill is all with the extra.

Also, if you check the scripts and scraps forum, JsPatriot made a MD5hash that may be handy for you.

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

I'll give it a try. Thx.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Err, just one question: md5 are usefull to verify data. Very usefull, indeed.

Do you suggest something like this?

If _md5 (@UserName) = IniRead($IniFile, $Drive, "Test", "") Then 
...

...or what's the trick? (Since I wanted a unified version for all users.)

Please be patient, I'm @ work for about 11 hours and leaving now. :lmao:

Edited by dabus

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