Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "DATA_BLOB" in [All]

crypt32

.
Summary
The CryptProtectData function performs encryption on the data in a DATA_BLOB structure. Typically, only a user with the same logon credential as the encrypter can decrypt the data. In addition, the encryption and decryption usually must be done on the same computer.
.

    ref DATA_BLOB pDataIn,

.

    ref DATA_BLOB pOptionalEntropy,

.

    ref DATA_BLOB pDataOut

.

    ByRef pDataIn As DATA_BLOB, _

.

    ByRef pOptionalEntropy As DATA_BLOB, _

.

    ByRef pDataOut As DATA_BLOB _

.

DATA_BLOB

.

Change the DATA_BLOB and CRYPTPROTECT_PROMPTSTRUT from structures to classes. This way you don't have to pass the value types by ref. Both the pOptionalEntropy and the pPromptStruct can be null. If you use structs you have to new empty structs instead of just passing null if you use classes.

.
Summary
The CryptUnprotectData function decrypts and does an integrity check of the data in a DATA_BLOB structure. Usually, only a user with the same logon credentials as the encrypter can decrypt the data. In addition, the encryption and decryption must be done on the same computer.
.

    ref DATA_BLOB pDataIn,

.

    ref DATA_BLOB pOptionalEntropy,

.

    ref DATA_BLOB pDataOut

.

     ByRef pDataIn As DATA_BLOB, _

.

     ByRef pOptionalEntropy As DATA_BLOB, _

.

     ByRef pDataOut As DATA_BLOB _

.

DATA_BLOB

.

    internal struct CRYPT_DATA_BLOB

.

Declare Function CRYPT_DATA_BLOB Lib "crypt32.dll" (TODO) As TODO

.
Documentation
[CRYPT_DATA_BLOB] on MSDN
.

        public CRYPT_DATA_BLOB ListIdentifier;

.

        ref CRYPT_DATA_BLOB pPfx,

.

    ByRef pPfx As CRYPT_DATA_BLOB, _

.

    internal struct CRYPT_DATA_BLOB

.

                ref CRYPT_DATA_BLOB pPfx);

.

    ByRef pPfx As CRYPT_DATA_BLOB) As Boolean

.

    internal struct CRYPT_DATA_BLOB

Structures

.

private struct DATA_BLOB {

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> Structure DATA_BLOB

.

Remember that DATA_BLOB.pbData for the output parameters of the CryptProtectData and CryptUnprotectData functions will point to a block of unmanaged memory that needs to be cleaned up using a call to LocalFree from kernel32. You will of course have to use pinvoke to call LocalFree.

.
Documentation
[DATA_BLOB] on MSDN

 
Access PInvoke.net directly from VS: