Jump to content
Sign in to follow this  
jero1987

Encrypting Registry Keys

Recommended Posts

jero1987

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

Share this post


Link to post
Share on other sites
Nahuel

$StringOriginal="My string"

$EncString=_StringEncrypt($String,....); Encrypt here :)

RegWrite(....$EncString)

............

$EncRegString=RegRead(....)

$StringRead=_StringEncrypt($EncRegString...); Decrypt here ^_^

Share this post


Link to post
Share on other sites
jero1987

$StringOriginal="My string"

$EncString=_StringEncrypt($String,....); Encrypt here :)

RegWrite(....$EncString)

............

$EncRegString=RegRead(....)

$StringRead=_StringEncrypt($EncRegString...); Decrypt here ^_^

You my friend are the man.

Share this post


Link to post
Share on other sites
jero1987

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?

Share this post


Link to post
Share on other sites
weaponx

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)

Share this post


Link to post
Share on other sites
jero1987

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

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  

×