示例#1
0
static dev_hook *dc_get_sys_hook()
{
	dev_hook *hook = NULL;
	dev_hook *find;

	for (find = dc_first_hook(); find != NULL; find = dc_next_hook(find)) {
		if (find->pdo_dev->Flags & DO_SYSTEM_BOOT_PARTITION) hook = find;
	}
	return hook;
}
示例#2
0
int dc_num_mount()
{
	dev_hook *hook;
	int       num = 0;

	if (hook = dc_first_hook()) 
	{
		do 
		{
			num += (hook->flags & F_ENABLED);		
		} while (hook = dc_next_hook(hook));
	}

	return num;
}
示例#3
0
void dc_clean_keys() 
{
	dev_hook *hook;

	for (hook = dc_first_hook(); hook != NULL; hook = dc_next_hook(hook))
	{
		if (hook->dsk_key != NULL) RtlSecureZeroMemory(hook->dsk_key, sizeof(xts_key));
		if (hook->tmp_key != NULL) RtlSecureZeroMemory(hook->tmp_key, sizeof(xts_key));
		if (hook->hdr_key != NULL) RtlSecureZeroMemory(hook->hdr_key, sizeof(xts_key));
		
		RtlSecureZeroMemory(&hook->tmp_header, sizeof(dc_header));
	}

	// Write Back and Invalidate CPU Caches
	__wbinvd();
}
示例#4
0
int dc_mount_all(dc_pass *password, u32 flags)
{
	dev_hook *hook;
	int       num = 0;

	if (hook = dc_first_hook()) 
	{
		do 
		{
			if (dc_mount_device(hook->dev_name, password, flags) == ST_OK) {
				num++;
			}
		} while (hook = dc_next_hook(hook));
	}

	return num;
}