public async Task LinkVaultAsync(Device remoteDevice, HardwareVault vault) { if (!remoteDevice.AccessLevel.IsLinkRequired) { return; } var code = Encoding.UTF8.GetBytes(await _hardwareVaultService.GetVaultActivationCodeAsync(vault.Id)); var key = ConvertUtils.HexStringToBytes(_dataProtectionService.Decrypt(vault.MasterPassword)); await remoteDevice.Link(key, code, 3); await _hardwareVaultService.SetVaultStatusAppliedAsync(vault); }