Clear encryption key only when encryption enabled

Description

Changes include:

  • Making EncryptionControl stateful
  • Calling clearEncryptionKey() on the drive only when encryption is on.

Also includes a minor duplicate code fix on DriveGeneric.cpp.

Merge request reports

Loading