jero1987 Posted December 7, 2007 Share Posted December 7, 2007 I have a question on encrypting registry keys created by auto it. Is there anyway to encrypt the keys created by RegWrite and then unencrypt them when i use regread? If you could give me sample code that would be amazing. Thanks Link to comment Share on other sites More sharing options...
Nahuel Posted December 7, 2007 Share Posted December 7, 2007 $StringOriginal="My string" $EncString=_StringEncrypt($String,....); Encrypt here RegWrite(....$EncString) ............ $EncRegString=RegRead(....) $StringRead=_StringEncrypt($EncRegString...); Decrypt here Link to comment Share on other sites More sharing options...
jero1987 Posted December 7, 2007 Author Share Posted December 7, 2007 $StringOriginal="My string"$EncString=_StringEncrypt($String,....); Encrypt here RegWrite(....$EncString)............$EncRegString=RegRead(....)$StringRead=_StringEncrypt($EncRegString...); Decrypt here You my friend are the man. Link to comment Share on other sites More sharing options...
jero1987 Posted December 7, 2007 Author Share Posted December 7, 2007 Okay so the encryption works but when i try to decrypt the key and output it to a text box it does not display correctly. Could you give me alittle more detailed sample code? Link to comment Share on other sites More sharing options...
weaponx Posted December 7, 2007 Share Posted December 7, 2007 Make sure the encryption level is the same on both encrypt and decrypt. #include <String.au3> ;String to encrypt $inString = "Oh my god it's a mirage, i'm tellin ya'll it's sabotage!" $encrypted = _StringEncrypt (1, $inString, "2girls1cup", 2) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest", "REG_SZ",$encrypted) ConsoleWrite($encrypted & @CRLF) ;Decrypted string $encrypted = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest") $decrypted = _StringEncrypt (0, $encrypted, "2girls1cup", 2) ConsoleWrite($decrypted & @CRLF) Link to comment Share on other sites More sharing options...
jero1987 Posted December 7, 2007 Author Share Posted December 7, 2007 Make sure the encryption level is the same on both encrypt and decrypt. #include <String.au3> ;String to encrypt $inString = "Oh my god it's a mirage, i'm tellin ya'll it's sabotage!" $encrypted = _StringEncrypt (1, $inString, "2girls1cup", 2) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest", "REG_SZ",$encrypted) ConsoleWrite($encrypted & @CRLF) ;Decrypted string $encrypted = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest") $decrypted = _StringEncrypt (0, $encrypted, "2girls1cup", 2) ConsoleWrite($decrypted & @CRLF)gracias 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