IManager

interface OCP\Encryption\IManager
This class provides access to files encryption apps.
Implemented by:OC\Encryption\Manager
Source:lib/public/Encryption/IManager.php#36

Methods

public OCP\Encryption\IManager::isEnabled()
Check if encryption is available (at least one encryption module needs to be enabled)
Source:lib/public/Encryption/IManager.php#44
Returns:bool true if enabled, false if not
Since:8.1.0
public OCP\Encryption\IManager::registerEncryptionModule($id, $displayName, $callback)
Registers an callback function which must return an encryption module instance
Source:

lib/public/Encryption/IManager.php#55

Parameters:
  • $id (string)
  • $displayName (string)
  • $callback (callable)
Throws:

\OC\Encryption\Exceptions\ModuleAlreadyExistsException

Since:

8.1.0

public OCP\Encryption\IManager::unregisterEncryptionModule($moduleId)
Unregisters an encryption module
Source:

lib/public/Encryption/IManager.php#63

Parameters:
  • $moduleId (string)
Since:

8.1.0

public OCP\Encryption\IManager::getEncryptionModules()
get a list of all encryption modules
Source:lib/public/Encryption/IManager.php#71
Returns:array [id => [‘id’ => $id, ‘displayName’ => $displayName, ‘callback’ => callback]]
Since:8.1.0
public OCP\Encryption\IManager::getEncryptionModule($moduleId="")
get a specific encryption module
Source:

lib/public/Encryption/IManager.php#82

Parameters:
  • $moduleId (string) Empty to get the default module
Returns:

\OCP\Encryption\IEncryptionModule

Throws:

\OC\Encryption\Exceptions\ModuleDoesNotExistsException

Since:

8.1.0

public OCP\Encryption\IManager::getDefaultEncryptionModuleId()
get default encryption module Id
Source:lib/public/Encryption/IManager.php#90
Returns:string
Since:8.1.0
public OCP\Encryption\IManager::setDefaultEncryptionModule($moduleId)
set default encryption module Id
Source:

lib/public/Encryption/IManager.php#99

Parameters:
  • $moduleId (string)
Returns:

string

Since:

8.1.0