void dc_init_encryption()
{
	DbgMsg("dc_init_encryption\n");

	if (aes256_padlock_available() != 0) {
		SetFlag(dc_load_flags, DST_VIA_PADLOCK);
		DbgMsg("CpuFlags_VIA_PadLock: Yes\n");
	} else {
		ClearFlag(dc_load_flags, DST_VIA_PADLOCK);
		DbgMsg("CpuFlags_VIA_PadLock: No\n");
	}
	
	if (xts_aes_ni_available() != 0) {
		SetFlag(dc_load_flags, DST_INTEL_NI);
		DbgMsg("CpuFlags_AES_NI: Yes\n");
	} else {
		ClearFlag(dc_load_flags, DST_INTEL_NI);
		DbgMsg("CpuFlags_AES_NI: No\n");
	}

#ifdef _M_IX86
	if (xts_serpent_sse2_available() != 0) {
		SetFlag(dc_load_flags, DST_INSTR_SSE2);
		DbgMsg("CpuFlags_SSE2: Yes\n");
	} else {
		ClearFlag(dc_load_flags, DST_INSTR_SSE2);
		DbgMsg("CpuFlags_SSE2: No\n");
	}
#else
	DbgMsg("CpuFlags_SSE2: Yes\n");
	SetFlag(dc_load_flags, DST_INSTR_SSE2);
#endif

	if (xts_serpent_avx_available() != 0) {
		SetFlag(dc_load_flags, DST_INSTR_AVX);
		DbgMsg("CpuFlags_AVX: Yes\n");
	} else {
		ClearFlag(dc_load_flags, DST_INSTR_AVX);
		DbgMsg("CpuFlags_AVX: No\n");
	}

	// initialize XTS mode engine and run small encryption test
	xts_init(dc_conf_flags & CONF_HW_CRYPTO);
	dc_simple_encryption_test();
}
int wmain(int argc, wchar_t *argv[])
{
#if !defined(SMALL_CODE) || !defined(_M_X64)
	printf("VIA-Padlock support: %d\n", aes256_padlock_available());
#endif
#ifndef SMALL_CODE
	printf("AES-NI support: %d\n", xts_aes_ni_available());
	printf("SSE2 support: %d\n", xts_serpent_sse2_available());
	printf("AVX  support: %d\n", xts_serpent_avx_available());
	printf("crc32: %d\n", test_crc32());
#endif	
	printf("sha512: %d\n", test_sha512());
	printf("pkcs5: %d\n", test_pkcs5());
	printf("Aes-256: %d\n", test_aes256());
	printf("Twofish-256: %d\n", test_twofish256());
	printf("Seprent-256: %d\n", test_serpent256());
	printf("XTS: %d\n", test_xts_mode());

	_getch(); return 0;
}