Share via


Decrypt

Decrypts a data buffer using the key associated with the cryptography object.

HRESULT
__stdcall Decrypt(
                      __in PINFORMATIONCARD_CRYPTO_HANDLE hCrypto,
                      __in BOOL fOAEP,
                      __in DWORD cbInData,
                      __in_bcount( cbInData ) PBYTE pInData,
                      __out DWORD *pcbOutData,
                      __out_bcount( *pcbOutData ) PBYTE* ppOutData );

Parameters

Parameter Description

hCrypto

Handle to the cryptography object associated with a previously released security token.

fOAEP

If false, Public-Key Cryptography Standards (PKCS1) v1.5 padding is stripped from the decrypted data. If true, PKCS1 v2 is stripped from the decrypted data.

cbInData

The length, in bytes, of the input buffer.

pInData

The data to be decrypted.

pcbOutData

The length, in bytes, of the output buffer.

ppOutData

The output buffer in which to put the decrypted data. When you have finished using this buffer, free it using the Win32 GlobalFree function.

Property Value/Return Value

HRESULT: If any of the parameters are NULL or 0, E_INVALIDARG is returned. If the buffer is NULL, then E_OUTOFMEMORY is returned.

Requirements

Windows Vista

Header: Declared in infocard.h.

Library: Use infocardapi.lib.

See Also

Reference

Encrypt

Concepts

HRESULTS Returned

Copyright © 2007 by Microsoft Corporation. All rights reserved.