ReactOS 0.4.16-dev-197-g92996da
protectdata.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winerror.h>
#include <wincrypt.h>
#include "wine/test.h"
Include dependency graph for protectdata.c:

Go to the source code of this file.

Functions

static BOOL (WINAPI *pCryptProtectData)(DATA_BLOB *
 
static void test_cryptprotectdata (void)
 
static void test_cryptunprotectdata (void)
 
static void test_simpleroundtrip (const char *plaintext)
 
 START_TEST (protectdata)
 

Variables

static LPCWSTR
 
static DATA_BLOB PVOID
 
static DATA_BLOB CRYPTPROTECT_PROMPTSTRUCT DWORD
 
static DATA_BLOB CRYPTPROTECT_PROMPTSTRUCT DATA_BLOB *static LPWSTR DATA_BLOB CRYPTPROTECT_PROMPTSTRUCT DATA_BLOB *static char secret [] = "I am a super secret string that no one can see!"
 
static char secret2 [] = "I am a super secret string indescribable string"
 
static char key [] = "Wibble wibble wibble"
 
static const WCHAR desc [] = {'U','l','t','r','a',' ','s','e','c','r','e','t',' ','t','e','s','t',' ','m','e','s','s','a','g','e',0}
 
static BOOL protected = FALSE
 
static DATA_BLOB cipher
 
static DATA_BLOB cipher_entropy
 
static DATA_BLOB cipher_no_desc
 

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pCryptProtectData)
static

◆ START_TEST()

START_TEST ( protectdata  )

Definition at line 244 of file protectdata.c.

245{
246 HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll");
247 pCryptProtectData = (void*)GetProcAddress(hCrypt32, "CryptProtectData");
248 pCryptUnprotectData = (void*)GetProcAddress(hCrypt32, "CryptUnprotectData");
249 if (!pCryptProtectData || !pCryptUnprotectData)
250 {
251 win_skip("Crypt(Un)ProtectData() is not available\n");
252 return;
253 }
254
255 protected=FALSE;
259 test_simpleroundtrip("hello");
260
261 /* deinit globals here */
265}
#define FALSE
Definition: types.h:117
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static DATA_BLOB cipher_no_desc
Definition: protectdata.c:40
static DATA_BLOB cipher
Definition: protectdata.c:38
static void test_simpleroundtrip(const char *plaintext)
Definition: protectdata.c:216
static void test_cryptprotectdata(void)
Definition: protectdata.c:42
static void test_cryptunprotectdata(void)
Definition: protectdata.c:109
static DATA_BLOB cipher_entropy
Definition: protectdata.c:39
#define win_skip
Definition: test.h:163
BYTE * pbData
Definition: wincrypt.h:103

◆ test_cryptprotectdata()

static void test_cryptprotectdata ( void  )
static

Definition at line 42 of file protectdata.c.

43{
44 LONG r;
45 DATA_BLOB plain;
46 DATA_BLOB entropy;
47
48 plain.pbData=(void*)secret;
49 plain.cbData=strlen(secret)+1;
50
51 entropy.pbData=(void*)key;
52 entropy.cbData=strlen(key)+1;
53
54 SetLastError(0xDEADBEEF);
55 protected = pCryptProtectData(NULL,desc,NULL,NULL,NULL,0,&cipher);
56 ok(!protected, "Encrypting without plain data source.\n");
57 r = GetLastError();
58 ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r);
59
60 SetLastError(0xDEADBEEF);
61 protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,NULL);
62 ok(!protected, "Encrypting without cipher destination.\n");
63 r = GetLastError();
64 ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r);
65
67 cipher.cbData=0;
68
69 /* without entropy */
70 SetLastError(0xDEADBEEF);
71 protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,&cipher);
72 ok(protected ||
73 broken(!protected), /* Win9x/NT4 */
74 "Encrypting without entropy.\n");
75 if (protected)
76 {
77 r = GetLastError();
78 ok(r == ERROR_SUCCESS ||
79 r == ERROR_IO_PENDING, /* win2k */
80 "Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r);
81 }
82
85
86 /* with entropy */
87 SetLastError(0xDEADBEEF);
88 protected = pCryptProtectData(&plain,desc,&entropy,NULL,NULL,0,&cipher_entropy);
89 ok(protected ||
90 broken(!protected), /* Win9x/NT4 */
91 "Encrypting with entropy.\n");
92
95
96 /* with entropy but no description */
97 plain.pbData=(void*)secret2;
98 plain.cbData=strlen(secret2)+1;
99 SetLastError(0xDEADBEEF);
100 protected = pCryptProtectData(&plain,NULL,&entropy,NULL,NULL,0,&cipher_no_desc);
101 if (!protected)
102 {
103 /* fails in win2k */
105 "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
106 }
107}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define ok(value,...)
Definition: atltest.h:57
#define broken(x)
Definition: atltest.h:178
#define ERROR_IO_PENDING
Definition: dderror.h:15
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static char secret2[]
Definition: protectdata.c:34
static const WCHAR desc[]
Definition: protectdata.c:36
static DATA_BLOB CRYPTPROTECT_PROMPTSTRUCT DATA_BLOB *static LPWSTR DATA_BLOB CRYPTPROTECT_PROMPTSTRUCT DATA_BLOB *static char secret[]
Definition: protectdata.c:33
long LONG
Definition: pedump.c:60
Definition: copy.c:22
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by START_TEST().

◆ test_cryptunprotectdata()

static void test_cryptunprotectdata ( void  )
static

Definition at line 109 of file protectdata.c.

110{
111 LONG r;
112 DATA_BLOB plain;
113 DATA_BLOB entropy;
114 BOOL okay;
115 WCHAR * data_desc;
116
117 entropy.pbData=(void*)key;
118 entropy.cbData=strlen(key)+1;
119
120 /* fails in win2k */
121 if (!protected)
122 {
123 skip("CryptProtectData failed to run\n");
124 return;
125 }
126
127 plain.pbData=NULL;
128 plain.cbData=0;
129
130 SetLastError(0xDEADBEEF);
131 okay = pCryptUnprotectData(&cipher,NULL,NULL,NULL,NULL,0,NULL);
132 ok(!okay,"Decrypting without destination\n");
133 r = GetLastError();
134 ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r);
135
136 SetLastError(0xDEADBEEF);
137 okay = pCryptUnprotectData(NULL,NULL,NULL,NULL,NULL,0,&plain);
138 ok(!okay,"Decrypting without source\n");
139 r = GetLastError();
140 ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r);
141
142 plain.pbData=NULL;
143 plain.cbData=0;
144
145 SetLastError(0xDEADBEEF);
146 okay = pCryptUnprotectData(&cipher_entropy,NULL,NULL,NULL,NULL,0,&plain);
147 ok(!okay,"Decrypting without needed entropy\n");
148 r = GetLastError();
149 ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n", r);
150
151 plain.pbData=NULL;
152 plain.cbData=0;
153 data_desc=NULL;
154
155 /* without entropy */
156 SetLastError(0xDEADBEEF);
157 okay = pCryptUnprotectData(&cipher,&data_desc,NULL,NULL,NULL,0,&plain);
158 ok(okay,"Decrypting without entropy\n");
159
160 ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n");
161 ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n");
162 ok(!strcmp((const char*)plain.pbData,secret),"Plain does not match secret\n");
163 ok(data_desc!=NULL,"Description not allocated\n");
164 ok(!lstrcmpW(data_desc,desc),"Description does not match\n");
165
166 LocalFree(plain.pbData);
167 LocalFree(data_desc);
168
169 plain.pbData=NULL;
170 plain.cbData=0;
171 data_desc=NULL;
172
173 /* with wrong entropy */
174 SetLastError(0xDEADBEEF);
175 okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&cipher_entropy,NULL,NULL,0,&plain);
176 ok(!okay,"Decrypting with wrong entropy\n");
177 r = GetLastError();
178 ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n",r);
179
180 /* with entropy */
181 SetLastError(0xDEADBEEF);
182 okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&entropy,NULL,NULL,0,&plain);
183 ok(okay,"Decrypting with entropy\n");
184
185 ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n");
186 ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n");
187 ok(!strcmp((const char*)plain.pbData,secret),"Plain does not match secret\n");
188 ok(data_desc!=NULL,"Description not allocated\n");
189 ok(!lstrcmpW(data_desc,desc),"Description does not match\n");
190
191 LocalFree(plain.pbData);
192 LocalFree(data_desc);
193
194 plain.pbData=NULL;
195 plain.cbData=0;
196 data_desc=NULL;
197
198 /* with entropy but no description */
199 SetLastError(0xDEADBEEF);
200 okay = pCryptUnprotectData(&cipher_no_desc,&data_desc,&entropy,NULL,NULL,0,&plain);
201 ok(okay,"Decrypting with entropy and no description\n");
202
203 ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n");
204 ok(plain.cbData==strlen(secret2)+1,"Plain DATA_BLOB wrong length\n");
205 ok(!strcmp((const char*)plain.pbData,secret2),"Plain does not match secret\n");
206 ok(data_desc!=NULL,"Description not allocated\n");
207 ok(data_desc[0]=='\0',"Description not empty\n");
208
209 LocalFree(data_desc);
210 LocalFree(plain.pbData);
211
212 plain.pbData=NULL;
213 plain.cbData=0;
214}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define skip(...)
Definition: atltest.h:64
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ERROR_INVALID_DATA
Definition: winerror.h:116
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by START_TEST().

◆ test_simpleroundtrip()

static void test_simpleroundtrip ( const char plaintext)
static

Definition at line 216 of file protectdata.c.

217{
219 DATA_BLOB encrypted;
220 DATA_BLOB output;
221 int res;
222 WCHAR emptyW[1];
223
224 emptyW[0] = 0;
225 input.pbData = (unsigned char *)plaintext;
226 input.cbData = strlen(plaintext);
227 res = pCryptProtectData(&input, emptyW, NULL, NULL, NULL, 0, &encrypted);
228 ok(res != 0 || broken(!res), "can't protect\n");
229 if (!res)
230 {
231 /* Fails on Win9x, NT4 */
232 win_skip("CryptProtectData failed\n");
233 return;
234 }
235
236 res = pCryptUnprotectData(&encrypted, NULL, NULL, NULL, NULL, 0, &output);
237 ok(res != 0, "can't unprotect; last error %u\n", GetLastError());
238 ok(output.cbData == strlen(plaintext), "output wrong length %d for input '%s', wanted %d\n", output.cbData, plaintext, lstrlenA(plaintext));
239 ok(!memcmp(plaintext, (char *)output.pbData, output.cbData), "output wrong contents for input '%s'\n", plaintext);
240 LocalFree(output.pbData);
241 LocalFree(encrypted.pbData);
242}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
GLuint res
Definition: glext.h:9613
GLenum GLenum GLenum input
Definition: glext.h:9031
static const WCHAR emptyW[]
Definition: navigate.c:40
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145

Referenced by START_TEST().

Variable Documentation

◆ cipher

◆ cipher_entropy

DATA_BLOB cipher_entropy
static

Definition at line 39 of file protectdata.c.

Referenced by START_TEST(), test_cryptprotectdata(), and test_cryptunprotectdata().

◆ cipher_no_desc

DATA_BLOB cipher_no_desc
static

Definition at line 40 of file protectdata.c.

Referenced by START_TEST(), test_cryptprotectdata(), and test_cryptunprotectdata().

◆ desc

const WCHAR desc[] = {'U','l','t','r','a',' ','s','e','c','r','e','t',' ','t','e','s','t',' ','m','e','s','s','a','g','e',0}
static

Definition at line 36 of file protectdata.c.

Referenced by add_ffp_frag_shader(), add_func_info(), arbfp_blit_set(), build_tree(), ATL::CImage::BuildCodecFilterString(), FxCmResList::BuildPortResourceTable(), FxCmResList::BuildRegisterResourceTable(), check_access(), check_emfplus(), check_lnk_(), check_metafile(), check_record(), check_sharing(), check_transform_applicable(), ciffile_GetDescription(), col_IDirectMusicObject_ParseDescriptor(), compare_emf_bits(), compare_mf_bits(), compare_mf_disk_bits(), compile_procedure(), ComplexBufferSize(), ComplexFree(), ComplexMarshall(), ComplexStructMemorySize(), ComplexStructSize(), ComplexUnmarshall(), component_GetDescription(), create_buffer_view(), create_class_funcprop(), create_default_samplers(), create_lnk_(), create_picture(), create_texture_view(), create_vbdisp(), CRYPT_AsnEncodePKCSAttributes(), CRYPT_DEREncodeItemsAsSet(), cubetexture_init(), d3d3_CreateVertexBuffer(), d3d7_CreateVertexBuffer(), d3d8_device_create_surface(), d3d8_device_CreateAdditionalSwapChain(), d3d8_device_prepare_index_buffer(), d3d8_device_prepare_vertex_buffer(), d3d8_GetAdapterMonitor(), d3d8_indexbuffer_GetDesc(), d3d8_pixel_shader_init(), d3d8_surface_GetDesc(), d3d8_surface_LockRect(), d3d8_swapchain_create(), d3d8_texture_2d_GetLevelDesc(), d3d8_texture_3d_GetLevelDesc(), d3d8_texture_cube_GetLevelDesc(), d3d8_vertex_shader_init(), d3d8_vertexbuffer_GetDesc(), d3d8_volume_GetDesc(), d3d9_device_ColorFill(), d3d9_device_create_surface(), d3d9_device_CreateAdditionalSwapChain(), d3d9_device_prepare_index_buffer(), d3d9_device_prepare_vertex_buffer(), d3d9_GetAdapterMonitor(), d3d9_indexbuffer_GetDesc(), d3d9_surface_GetDesc(), d3d9_swapchain_create(), d3d9_swapchain_GetPresentParameters(), d3d9_texture_2d_GetLevelDesc(), d3d9_texture_3d_GetLevelDesc(), d3d9_texture_acquire_shader_resource_view(), d3d9_texture_cube_GetLevelDesc(), d3d9_vertexbuffer_GetDesc(), d3d9_volume_GetDesc(), d3d_device3_GetRenderState(), d3d_device3_SetRenderState(), d3d_device3_SetTexture(), d3d_device7_GetCaps_FPUPreserve(), d3d_device7_GetCaps_FPUSetup(), d3d_device_prepare_index_buffer(), d3d_device_prepare_vertex_buffer(), d3d_execute_buffer_init(), d3d_execute_buffer_Initialize(), d3d_execute_buffer_Lock(), d3d_execute_buffer_SetExecuteData(), d3d_vertex_buffer7_GetVertexBufferDesc(), d3d_vertex_buffer_create(), d3d_vertex_buffer_create_wined3d_buffer(), d3dcompiler_parse_rdef(), d3dcompiler_parse_type(), d3dcompiler_shader_reflection_constant_buffer_GetDesc(), d3dcompiler_shader_reflection_GetDesc(), d3dcompiler_shader_reflection_GetInputParameterDesc(), d3dcompiler_shader_reflection_GetOutputParameterDesc(), d3dcompiler_shader_reflection_GetPatchConstantParameterDesc(), d3dcompiler_shader_reflection_GetResourceBindingDesc(), d3dcompiler_shader_reflection_GetResourceBindingDescByName(), d3dcompiler_shader_reflection_type_GetDesc(), d3dcompiler_shader_reflection_variable_GetDesc(), D3DKMTCreateDCFromMemory(), D3DKMTDestroyDCFromMemory(), d3drm_device_init(), d3drm_device_set_ddraw_device_d3d(), d3dx9_animation_controller_GetEventDesc(), d3dx9_animation_controller_GetTrackDesc(), d3dx9_animation_controller_SetTrackDesc(), d3dx9_fragment_linker_GetFragmentDesc(), d3dx9_texture_shader_GetDesc(), d3dx_effect_GetDesc(), d3dx_effect_GetFunctionDesc(), d3dx_effect_GetParameterDesc(), d3dx_effect_GetPassDesc(), d3dx_effect_GetTechniqueDesc(), D3DXCreateFontA(), D3DXCreateFontIndirectA(), D3DXCreateFontIndirectW(), D3DXCreateFontW(), D3DXFillCubeTexture(), D3DXFillTexture(), D3DXFillVolumeTexture(), D3DXFilterTexture(), D3DXLoadVolumeFromMemory(), D3DXLoadVolumeFromVolume(), D3DXRenderToEnvMap_GetDesc(), D3DXRenderToSurface_GetDesc(), ddraw7_EnumSurfaces(), ddraw7_GetAvailableVidMem(), ddraw_surface7_EnumAttachedSurfaces(), ddraw_surface_create(), ddraw_surface_init(), ddrawstreamsample_create(), DECLARE_INTERFACE(), DECLARE_INTERFACE_(), default_device_cb(), determine_patch_sequence(), device_load_logo(), device_parent_create_swapchain(), device_parent_create_swapchain_texture(), dmobj_IDirectMusicObject_GetDescriptor(), dmobj_IDirectMusicObject_SetDescriptor(), dmobj_IPersistStream_GetClassID(), dmobj_parsedescriptor(), DMUSIC_CreateDirectMusicBufferImpl(), dsound_enum(), DSPROPERTY_DescriptionW(), dump_DMUS_OBJECTDESC(), dump_emf_bits(), dump_emf_record(), dump_emf_records(), dump_mf_bits(), EnumDisplayModesCallbackThunk(), Ext2NewInode(), ext4_get_group_desc(), fill_videocontroller(), fragment_prog_arbfp(), free_buffers(), free_transform_desc(), ft_service_list_lookup(), func_restricted(), GdipRecordMetafile(), GdipRecordMetafileFileName(), GdipRecordMetafileFileNameI(), GdipRecordMetafileI(), GdipRecordMetafileStream(), gen_bitlen(), geometry_shader_init(), get_array_fc(), get_basetype(), get_buffer_view_range(), get_constant_by_name(), get_constants_desc(), get_ctab_constant_desc(), get_pnpdeviceid(), get_stack_size(), get_struct_fc(), get_texture_view_target(), GetBltStatus_Test(), CFunctionProviderBase::GetDescription(), GetPixel(), group_GetDescription(), handle_switch(), handle_switch_str(), ICInstall(), ID3DXConstantTableImpl_GetConstant(), ID3DXConstantTableImpl_GetConstantDesc(), ID3DXConstantTableImpl_GetConstantElement(), ID3DXConstantTableImpl_GetDesc(), ID3DXConstantTableImpl_SetDefaults(), ID3DXConstantTableImpl_SetValue(), ID3DXEffectCompilerImpl_GetDesc(), ID3DXEffectCompilerImpl_GetFunctionDesc(), ID3DXEffectCompilerImpl_GetParameterDesc(), ID3DXEffectCompilerImpl_GetPassDesc(), ID3DXEffectCompilerImpl_GetTechniqueDesc(), ID3DXFontImpl_GetDescA(), ID3DXFontImpl_GetDescW(), indexbuffer_init(), info_get_name(), init_buffers(), init_set_constants_param(), init_stub_desc(), init_test(), InputProcessorProfiles_AddLanguageProfile(), interp_obj_prop(), ITERATE_InstallODBCDataSource(), ITERATE_InstallODBCDriver(), ITERATE_InstallODBCTranslator(), ITERATE_RemoveODBCDataSource(), ITERATE_RemoveODBCDriver(), ITERATE_RemoveODBCTranslator(), jsdisp_define_property(), jsdisp_get_own_property(), link_notify_test(), lock_surface(), match_emf_record(), MCICDA_Play(), MSI_ApplicablePatchXML(), MSI_ProvideQualifiedComponentEx(), NdrAsyncClientCall(), NdrClientCall2(), NtGdiDdDDICreateDCFromMemory(), NtGdiDdDDIDestroyDCFromMemory(), ODBC_ReplicateODBCInstToRegistry(), ODBC_ReplicateODBCToRegistry(), of_type(), OnTarget(), parse_script_with_error_a(), pixel_shader_init(), pixelshader_init(), play_metafile(), PointerBufferSize(), PointerFree(), PointerMarshall(), PointerMemorySize(), PointerUnmarshall(), ranges_assert(), rdssl_hmac_md5(), rdssl_rc4_set_key(), rdssl_rkey_get_exp_mod(), register_dsound_devices(), release_property_descriptor(), reset_buffers(), reset_enum_callback(), RtlQuerySecurityObject(), sampler(), set(), set_tex_op_atifs(), SHAddToRecentDocs(), shader_glsl_find_ffp_fragment_shader(), shader_glsl_find_ffp_vertex_shader(), shader_glsl_free_ffp_vertex_shader(), shader_init(), src_get_description(), src_get_name(), sspi_get_mic(), sspi_verify_mic(), state_blend_object(), surface_callback(), surface_convert_format(), surface_validate_lock_desc(), swapchain_init(), test_button_data(), test_button_messages(), test_ConvertSecurityDescriptorToString(), test_create_device_from_clipper1(), test_create_device_from_clipper2(), test_create_device_from_clipper3(), test_create_device_from_d3d1(), test_create_device_from_d3d2(), test_create_device_from_d3d3(), test_create_device_from_surface1(), test_create_device_from_surface2(), test_create_device_from_surface3(), test_create_texture_from_surface(), test_cryptprotectdata(), test_cryptunprotectdata(), test_D3DXCreateRenderToEnvMap(), test_D3DXCreateRenderToSurface(), test_D3DXCreateTexture(), test_D3DXCreateTextureFromFileInMemory(), test_D3DXCreateTextureFromFileInMemoryEx(), test_dsound(), test_dump_typelib(), test_effect_find_next_valid_technique(), test_effect_get_pass_desc(), test_effect_null_shader(), test_encoders(), test_get_shader_constant_table_ex(), test_get_shader_constant_variables(), test_GetFileVersionInfoEx(), test_himetric(), test_ID3DXFont(), test_IDirectDrawStreamSample(), test_isparameterused_children(), test_load_save(), test_load_save_bmp(), test_load_save_emf(), test_load_save_empty_picture(), test_load_save_icon(), test_msidecomposedesc(), test_MsiProvideQualifiedComponentEx(), test_NtGdiDdCanCreateSurface(), test_OleCreatePictureIndirect(), test_reflection_bound_resources(), test_reflection_desc_ps(), test_reflection_desc_ps_output(), test_reflection_desc_vs(), test_registerset(), test_Render(), test_SetDocString(), test_SetVarHelpContext(), texture1d_init(), texture2d_create_dc(), texture_apply_base_level(), texture_init(), to_property_descriptor(), type_is_non_iface_pointer(), type_memsize(), type_needs_pointer_deref(), unfo_get_name(), union_arm_buffer_size(), union_arm_free(), union_arm_marshall(), union_arm_memory_size(), union_arm_unmarshall(), validate_resource_view(), VBScriptParseProcedure_ParseProcedureText(), vertex_shader_init(), vertexbuffer_init(), vertexshader_init(), VfdImageTip(), virtqueue_add_buf_packed(), virtqueue_add_buf_split(), volumetexture_init(), wined3d_blend_state_create(), wined3d_buffer_create(), wined3d_device_create_cursor_texture(), wined3d_get_output_desc(), wined3d_rasterizer_state_create(), wined3d_render_target_view_cs_init(), wined3d_rendertarget_view_create(), wined3d_rendertarget_view_create_from_sub_resource(), wined3d_rendertarget_view_init(), wined3d_resource_get_desc(), wined3d_sampler_create(), wined3d_sampler_cs_init(), wined3d_sampler_desc_from_sampler_states(), wined3d_sampler_init(), wined3d_shader_create_cs(), wined3d_shader_create_ds(), wined3d_shader_create_gs(), wined3d_shader_create_hs(), wined3d_shader_create_ps(), wined3d_shader_create_vs(), wined3d_shader_resource_view_create(), wined3d_shader_resource_view_cs_init(), wined3d_shader_resource_view_init(), wined3d_swapchain_create(), wined3d_swapchain_get_desc(), wined3d_texture_create(), wined3d_texture_get_sub_resource_desc(), wined3d_texture_init(), wined3d_unordered_access_view_create(), wined3d_unordered_access_view_cs_init(), wined3d_unordered_access_view_init(), wined3d_view_invalidate_location(), WMSFT_append_arraydesc(), WMSFT_append_typedesc(), WMSFT_compile_typeinfo_aux(), wpp_close(), wpp_open(), wpp_read(), write_array_tfs(), write_complex_struct_pointer_layout(), write_complex_struct_pointer_ref(), write_complex_struct_tfs(), write_iface_fs(), write_param_fs(), write_pointer_tfs(), write_proc_func_header(), write_struct_members(), write_type_tfs(), and xsltDefaultSortFunction().

◆ DWORD

◆ key

char key[] = "Wibble wibble wibble"
static

Definition at line 35 of file protectdata.c.

◆ LPCWSTR

Definition at line 30 of file protectdata.c.

◆ protected

BOOL protected = FALSE
static

Definition at line 37 of file protectdata.c.

◆ PVOID

◆ secret

◆ secret2

char secret2[] = "I am a super secret string indescribable string"
static

Definition at line 34 of file protectdata.c.

Referenced by test_cryptprotectdata(), and test_cryptunprotectdata().