public async Task AccessVaultAsync(Device remoteDevice, HardwareVault vault) { var accessParams = await _hardwareVaultService.GetAccessParamsAsync(vault.Id); var key = ConvertUtils.HexStringToBytes(_dataProtectionService.Decrypt(vault.MasterPassword)); await remoteDevice.Access(DateTime.UtcNow, key, accessParams); }
private async Task ProfileVaultAsync(Device remoteDevice, HardwareVaultTask task) { var accessParams = await _hardwareVaultService.GetAccessParamsAsync(task.HardwareVaultId); var key = ConvertUtils.HexStringToBytes(task.Password); await remoteDevice.Access(DateTime.UtcNow, key, accessParams); }