FreeRDP
winpr/libwinpr/crypto/crypto.c File Reference
#include <winpr/config.h>
#include <winpr/crypto.h>
#include "crypto.h"
#include <winpr/crt.h>
#include <winpr/collections.h>

Functions

BOOL CryptProtectMemory (LPVOID pData, DWORD cbData, DWORD dwFlags)
 
BOOL CryptUnprotectMemory (LPVOID pData, DWORD cbData, DWORD dwFlags)
 
BOOL CryptProtectData (DATA_BLOB *pDataIn, LPCWSTR szDataDescr, DATA_BLOB *pOptionalEntropy, PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT *pPromptStruct, DWORD dwFlags, DATA_BLOB *pDataOut)
 
BOOL CryptUnprotectData (DATA_BLOB *pDataIn, LPWSTR *ppszDataDescr, DATA_BLOB *pOptionalEntropy, PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT *pPromptStruct, DWORD dwFlags, DATA_BLOB *pDataOut)
 
BOOL CryptStringToBinaryW (LPCWSTR pszString, DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags)
 
BOOL CryptStringToBinaryA (LPCSTR pszString, DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags)
 
BOOL CryptBinaryToStringW (CONST BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, DWORD *pcchString)
 
BOOL CryptBinaryToStringA (CONST BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString)
 

Variables

static wListDictionary * g_ProtectedMemoryBlocks = NULL
 

Function Documentation

◆ CryptBinaryToStringA()

BOOL CryptBinaryToStringA ( CONST BYTE pbBinary,
DWORD  cbBinary,
DWORD  dwFlags,
LPSTR  pszString,
DWORD *  pcchString 
)

◆ CryptBinaryToStringW()

BOOL CryptBinaryToStringW ( CONST BYTE pbBinary,
DWORD  cbBinary,
DWORD  dwFlags,
LPWSTR  pszString,
DWORD *  pcchString 
)

◆ CryptProtectData()

BOOL CryptProtectData ( DATA_BLOB pDataIn,
LPCWSTR  szDataDescr,
DATA_BLOB pOptionalEntropy,
PVOID  pvReserved,
CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
DWORD  dwFlags,
DATA_BLOB pDataOut 
)

◆ CryptProtectMemory()

BOOL CryptProtectMemory ( LPVOID  pData,
DWORD  cbData,
DWORD  dwFlags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CryptStringToBinaryA()

BOOL CryptStringToBinaryA ( LPCSTR  pszString,
DWORD  cchString,
DWORD  dwFlags,
BYTE pbBinary,
DWORD *  pcbBinary,
DWORD *  pdwSkip,
DWORD *  pdwFlags 
)

◆ CryptStringToBinaryW()

BOOL CryptStringToBinaryW ( LPCWSTR  pszString,
DWORD  cchString,
DWORD  dwFlags,
BYTE pbBinary,
DWORD *  pcbBinary,
DWORD *  pdwSkip,
DWORD *  pdwFlags 
)

◆ CryptUnprotectData()

BOOL CryptUnprotectData ( DATA_BLOB pDataIn,
LPWSTR *  ppszDataDescr,
DATA_BLOB pOptionalEntropy,
PVOID  pvReserved,
CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
DWORD  dwFlags,
DATA_BLOB pDataOut 
)

◆ CryptUnprotectMemory()

BOOL CryptUnprotectMemory ( LPVOID  pData,
DWORD  cbData,
DWORD  dwFlags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_ProtectedMemoryBlocks

wListDictionary* g_ProtectedMemoryBlocks = NULL
static

WinPR: Windows Portable Runtime Cryptography API (CryptoAPI)

Copyright 2012-2013 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. CryptAcquireCertificatePrivateKey CryptBinaryToStringA CryptBinaryToStringW CryptCloseAsyncHandle CryptCreateAsyncHandle CryptCreateKeyIdentifierFromCSP CryptDecodeMessage CryptDecodeObject CryptDecodeObjectEx CryptDecryptAndVerifyMessageSignature CryptDecryptMessage CryptEncodeObject CryptEncodeObjectEx CryptEncryptMessage CryptEnumKeyIdentifierProperties CryptEnumOIDFunction CryptEnumOIDInfo CryptExportPKCS8 CryptExportPublicKeyInfo CryptExportPublicKeyInfoEx CryptExportPublicKeyInfoFromBCryptKeyHandle CryptFindCertificateKeyProvInfo CryptFindLocalizedName CryptFindOIDInfo CryptFormatObject CryptFreeOIDFunctionAddress CryptGetAsyncParam CryptGetDefaultOIDDllList CryptGetDefaultOIDFunctionAddress CryptGetKeyIdentifierProperty CryptGetMessageCertificates CryptGetMessageSignerCount CryptGetOIDFunctionAddress CryptGetOIDFunctionValue CryptHashCertificate CryptHashCertificate2 CryptHashMessage CryptHashPublicKeyInfo CryptHashToBeSigned CryptImportPKCS8 CryptImportPublicKeyInfo CryptImportPublicKeyInfoEx CryptImportPublicKeyInfoEx2 CryptInitOIDFunctionSet CryptInstallDefaultContext CryptInstallOIDFunctionAddress CryptLoadSip CryptMemAlloc CryptMemFree CryptMemRealloc CryptMsgCalculateEncodedLength CryptMsgClose CryptMsgControl CryptMsgCountersign CryptMsgCountersignEncoded CryptMsgDuplicate CryptMsgEncodeAndSignCTL CryptMsgGetAndVerifySigner CryptMsgGetParam CryptMsgOpenToDecode CryptMsgOpenToEncode CryptMsgSignCTL CryptMsgUpdate CryptMsgVerifyCountersignatureEncoded CryptMsgVerifyCountersignatureEncodedEx CryptQueryObject CryptRegisterDefaultOIDFunction CryptRegisterOIDFunction CryptRegisterOIDInfo CryptRetrieveTimeStamp CryptSetAsyncParam CryptSetKeyIdentifierProperty CryptSetOIDFunctionValue CryptSignAndEncodeCertificate CryptSignAndEncryptMessage CryptSignCertificate CryptSignMessage CryptSignMessageWithKey CryptSIPAddProvider CryptSIPCreateIndirectData CryptSIPGetCaps CryptSIPGetSignedDataMsg CryptSIPLoad CryptSIPPutSignedDataMsg CryptSIPRemoveProvider CryptSIPRemoveSignedDataMsg CryptSIPRetrieveSubjectGuid CryptSIPRetrieveSubjectGuidForCatalogFile CryptSIPVerifyIndirectData CryptUninstallDefaultContext CryptUnregisterDefaultOIDFunction CryptUnregisterOIDFunction CryptUnregisterOIDInfo CryptUpdateProtectedState CryptVerifyCertificateSignature CryptVerifyCertificateSignatureEx CryptVerifyDetachedMessageHash CryptVerifyDetachedMessageSignature CryptVerifyMessageHash CryptVerifyMessageSignature CryptVerifyMessageSignatureWithKey CryptVerifyTimeStampSignature DbgInitOSS DbgPrintf PFXExportCertStore PFXExportCertStore2 PFXExportCertStoreEx PFXImportCertStore PFXIsPFXBlob PFXVerifyPassword