2 * dlls/advapi32/crypt.c
10 #include "debugtools.h"
12 DEFAULT_DEBUG_CHANNEL(advapi);
14 /******************************************************************************
15 * CryptAcquireContextA (ADVAPI32.@)
16 * Acquire a crypto provider context handle.
19 * phProv: Pointer to HCRYPTPROV for the output.
20 * pszContainer: FIXME (unknown)
21 * pszProvider: FIXME (unknown)
22 * dwProvType: Crypto provider type to get a handle.
23 * dwFlags: flags for the operation
25 * RETURNS TRUE on success, FALSE on failure.
29 CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer,
30 LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
32 FIXME("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, pszContainer,
33 pszProvider, dwProvType, dwFlags);
37 /******************************************************************************
38 * CryptSetKeyParam (ADVAPI32.@)
41 CryptSetKeyParam( HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
43 FIXME("(%lx, %lx, %p, %lx): stub!\n", hKey, dwParam, pbData, dwFlags);
48 /******************************************************************************
49 * CryptGenRandom (ADVAPI32.@)
52 CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
56 FIXME("(0x%lx, %ld, %p): stub!\n", hProv, dwLen, pbBuffer);
58 FIXME: Currently this function is just a stub, it is missing functionality in
59 the following (major) ways:
60 (1) It makes no use of the passed in HCRYPTPROV handle. (ie. it doesn't
61 use a cryptographic service provider (CSP)
62 (2) It doesn't use the values in the passed in pbBuffer to further randomize
64 (3) MSDN mentions that this function produces "cryptographically random"
65 data, which is "... far more random than the data generated by the typical
66 random number generator such as the one shipped with your C compiler".
67 We are currently using the C runtime rand() function. ^_^
69 See MSDN documentation for CryptGenRandom for more information.
76 for (i=0; i<dwLen; i++)
78 *pbBuffer = (BYTE)(rand() % 256);
86 /******************************************************************************
87 * CryptReleaseContext (ADVAPI32.@)
90 CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
92 FIXME("(0x%lx, 0x%lx): stub!\n", hProv, dwFlags);