Jump to content

Data structures / pointers


Recommended Posts

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 by THAT1ANONYMOUSEDUDE
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by THAT1ANONYMOUSEDUDE
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...