IStorage

interface OCP\Encryption\Keys\IStorage
Interface IStorage
Implemented by:OC\Encryption\Keys\Storage
Source:lib/public/Encryption/Keys/IStorage.php#34

Methods

public OCP\Encryption\Keys\IStorage::getUserKey($uid, $keyId, $encryptionModuleId)
get user specific key
Source:

lib/public/Encryption/Keys/IStorage.php#46

Parameters:
  • $uid (string) ID if the user for whom we want the key
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

mixed key

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::getFileKey($path, $keyId, $encryptionModuleId)
get file specific key
Source:

lib/public/Encryption/Keys/IStorage.php#58

Parameters:
  • $path (string) path to file
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

mixed key

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::getSystemUserKey($keyId, $encryptionModuleId)
get system-wide encryption keys not related to a specific user,
e.g something like a key for public link shares
Source:

lib/public/Encryption/Keys/IStorage.php#70

Parameters:
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

mixed key

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::setUserKey($uid, $keyId, $key, $encryptionModuleId)
set user specific key
Source:

lib/public/Encryption/Keys/IStorage.php#81

Parameters:
  • $uid (string) ID if the user for whom we want the key
  • $keyId (string) id of the key
  • $key (mixed)
  • $encryptionModuleId (string)
Since:

8.1.0

public OCP\Encryption\Keys\IStorage::setFileKey($path, $keyId, $key, $encryptionModuleId)
set file specific key
Source:

lib/public/Encryption/Keys/IStorage.php#92

Parameters:
  • $path (string) path to file
  • $keyId (string) id of the key
  • $key (mixed)
  • $encryptionModuleId (string)
Since:

8.1.0

public OCP\Encryption\Keys\IStorage::setSystemUserKey($keyId, $key, $encryptionModuleId)
set system-wide encryption keys not related to a specific user,
e.g something like a key for public link shares
Source:

lib/public/Encryption/Keys/IStorage.php#105

Parameters:
  • $keyId (string) id of the key
  • $key (mixed)
  • $encryptionModuleId (string)
Returns:

mixed key

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::deleteUserKey($uid, $keyId, $encryptionModuleId)
delete user specific key
Source:

lib/public/Encryption/Keys/IStorage.php#117

Parameters:
  • $uid (string) ID if the user for whom we want to delete the key
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

bool False when the key could not be deleted

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::deleteFileKey($path, $keyId, $encryptionModuleId)
delete file specific key
Source:

lib/public/Encryption/Keys/IStorage.php#129

Parameters:
  • $path (string) path to file
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

bool False when the key could not be deleted

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::deleteAllFileKeys($path)
delete all file keys for a given file
Source:

lib/public/Encryption/Keys/IStorage.php#139

Parameters:
  • $path (string) to the file
Returns:

bool False when the keys could not be deleted

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::deleteSystemUserKey($keyId, $encryptionModuleId)
delete system-wide encryption keys not related to a specific user,
e.g something like a key for public link shares
Source:

lib/public/Encryption/Keys/IStorage.php#151

Parameters:
  • $keyId (string) id of the key
  • $encryptionModuleId (string)
Returns:

bool False when the key could not be deleted

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::renameKeys($source, $target)
copy keys if a file was renamed
Source:

lib/public/Encryption/Keys/IStorage.php#161

Parameters:
  • $source (string)
  • $target (string)
Returns:

bool

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::copyKeys($source, $target)
move keys if a file was renamed
Source:

lib/public/Encryption/Keys/IStorage.php#171

Parameters:
  • $source (string)
  • $target (string)
Returns:

bool

Since:

8.1.0

public OCP\Encryption\Keys\IStorage::backupUserKeys($encryptionModuleId, $purpose, $uid)
backup keys of a given encryption module
Source:

lib/public/Encryption/Keys/IStorage.php#182

Parameters:
  • $encryptionModuleId (string)
  • $purpose (string)
  • $uid (string)
Returns:

bool

Since:

12.0.0