Skitty Posted March 16, 2012 Posted March 16, 2012 (edited) I'm trying to retrieve the description of a previously crypted string from cryptprotectdata but I don't know what I'm doing wrong. Can anyone help? Local $Hash = "[String previously encrypted by cryptprotectdata API]" Local $Description = DllStructCreate("wstr");wrong structure type? Local $aReturn = DllCall _ ( _ "CRYPT32.dll", "int", "CryptUnprotectData", _ "ptr", DllStructGetPtr($BLOBIN), _ "ptr", DllStructGetPtr($Description), _; this is where something must be going wrong "ptr", 0, _ "ptr", 0, _ "ptr", 0, _ "dword", 0, _ "ptr", DllStructGetPtr($BLOBOUT) _ ) ConsoleWrite(DllStructGetData($Description, 1) & @CR) Edited March 16, 2012 by THAT1ANONYMOUSEDUDE
jaberwacky Posted March 16, 2012 Posted March 16, 2012 I think you'd use an array instead of a wstr. So I guess something along these lines:Local $Description = DllStructCreate("byte[512]") but that may not be perfect syntax. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
Skitty Posted March 18, 2012 Author Posted March 18, 2012 (edited) Wait, didn't I reply to you? I think you'd use an array instead of a wstr. So I guess something along these lines: Local $Description = DllStructCreate("byte[512]") but that may not be perfect syntax. I'm pretty sure I had replied to your post saying that I've tried that and was unsuccessful, I wonder what happened to it... But anyway, I'm still trying to figure this out, whenever I crypt a string and add a description to it, I just cant find out how to get it back, this is a real bummer.. Edited March 18, 2012 by THAT1ANONYMOUSEDUDE
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