public bool RequestBitLockerUnlock(IDevice device, DriveInformation drive, string password) { BitLockerControlEventArgs args = new BitLockerControlEventArgs(device, drive, false, password); BroadcastBitLockerControl(args); return(args.IsSuccess); }
public bool RequestBitLockerLock(IDevice device, DriveInformation drive) { BitLockerControlEventArgs args = new BitLockerControlEventArgs(device, drive, true); BroadcastBitLockerControl(args); return(args.IsSuccess); }
private void Broadcaster_BroadcastBitLockerControl(BitLockerControlEventArgs args) { if (Status == (int)SocketStatus.LoggedIn && device.Type == ClientType.Device && args.Device.Account.Id == device.Account.Id) { if (args.Lock) { Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerLockRequest(args.Drive)); } else { Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerUnlockRequest(args.Drive, args.Password, CryptoProvider)); } messageQueue.Wait(PacketType.ClientBitLockerCommandResponse); args.IsSuccess = (bool)messageQueue.Dequeue().Payload; } }