Encryption

class OC\Files\Stream\Encryption
Source:lib/private/Files/Stream/Encryption.php#40
Parent:Icewind\Streams\Wrapper

Properties

protected static property OC\Files\Stream\Encryption::$util
Source:lib/private/Files/Stream/Encryption.php#43
Type:\OC\Encryption\Util
protected static property OC\Files\Stream\Encryption::$file
Source:lib/private/Files/Stream/Encryption.php#46
Type:\OC\Encryption\File
protected static property OC\Files\Stream\Encryption::$encryptionModule
Source:lib/private/Files/Stream/Encryption.php#49
Type:\OCP\Encryption\IEncryptionModule
protected static property OC\Files\Stream\Encryption::$storage
Source:lib/private/Files/Stream/Encryption.php#52
Type:\OC\Files\Storage\Storage
protected static property OC\Files\Stream\Encryption::$encryptionStorage
Source:lib/private/Files/Stream/Encryption.php#55
Type:\OC\Files\Storage\Wrapper\Encryption
protected static property OC\Files\Stream\Encryption::$internalPath
Source:lib/private/Files/Stream/Encryption.php#58
Type:string
protected static property OC\Files\Stream\Encryption::$cache
Source:lib/private/Files/Stream/Encryption.php#61
Type:string
protected static property OC\Files\Stream\Encryption::$size
Source:lib/private/Files/Stream/Encryption.php#64
Type:int
protected static property OC\Files\Stream\Encryption::$position
Source:lib/private/Files/Stream/Encryption.php#67
Type:int
protected static property OC\Files\Stream\Encryption::$unencryptedSize
Source:lib/private/Files/Stream/Encryption.php#70
Type:int
protected static property OC\Files\Stream\Encryption::$headerSize
Source:lib/private/Files/Stream/Encryption.php#73
Type:int
protected static property OC\Files\Stream\Encryption::$unencryptedBlockSize
Source:lib/private/Files/Stream/Encryption.php#76
Type:int
protected static property OC\Files\Stream\Encryption::$header
Source:lib/private/Files/Stream/Encryption.php#79
Type:array
protected static property OC\Files\Stream\Encryption::$fullPath
Source:lib/private/Files/Stream/Encryption.php#82
Type:string
protected static property OC\Files\Stream\Encryption::$signed
Source:lib/private/Files/Stream/Encryption.php#85
Type:bool
protected static property OC\Files\Stream\Encryption::$newHeader
header data returned by the encryption module, will be written to the file
in case of a write operation
Source:lib/private/Files/Stream/Encryption.php#93
Type:array
protected static property OC\Files\Stream\Encryption::$uid
user who perform the read/write operation null for public access
Source:lib/private/Files/Stream/Encryption.php#100
Type:string
protected static property OC\Files\Stream\Encryption::$readOnly
Source:lib/private/Files/Stream/Encryption.php#103
Type:bool
protected static property OC\Files\Stream\Encryption::$writeFlag
Source:lib/private/Files/Stream/Encryption.php#106
Type:bool
protected static property OC\Files\Stream\Encryption::$expectedContextProperties
Source:lib/private/Files/Stream/Encryption.php#109
Type:array
protected static property OC\Files\Stream\Encryption::$fileUpdated
Source:lib/private/Files/Stream/Encryption.php#112
Type:bool

Methods

public OC\Files\Stream\Encryption::__construct()
Source:lib/private/Files/Stream/Encryption.php#114
public static OC\Files\Stream\Encryption::wrap($source, $internalPath, $fullPath, $header, $uid, $encryptionModule, $storage, $encStorage, $util, $file, $mode, $size, $unencryptedSize, $headerSize, $signed, $wrapper=\OC\Files\Stream\Encryption::class)
Wraps a stream with the provided callbacks
Source:

lib/private/Files/Stream/Encryption.php#157

Parameters:
Returns:

resource

Throws:

\BadMethodCallException

protected static OC\Files\Stream\Encryption::wrapSource($source, $context=[], $protocol=null, $class=null, $mode=r+)
add stream wrapper
Source:

lib/private/Files/Stream/Encryption.php#203

Parameters:
  • $source (resource | int)
  • $context (resource | array)
  • $protocol (string | null)
  • $class (string | null)
  • $mode (string)
Returns:

resource

Throws:

\BadMethodCallException

protected OC\Files\Stream\Encryption::loadContext($name=null)
Load the source from the stream context and return the context options
Source:

lib/private/Files/Stream/Encryption.php#243

Parameters:
  • $name (string | null)
Returns:

array

Throws:

\BadMethodCallException

public OC\Files\Stream\Encryption::stream_open($path, $mode, $options, &$opened_path)
Source:lib/private/Files/Stream/Encryption.php#256
public OC\Files\Stream\Encryption::stream_eof()
Source:lib/private/Files/Stream/Encryption.php#307
public OC\Files\Stream\Encryption::stream_read($count)
Source:lib/private/Files/Stream/Encryption.php#311
public OC\Files\Stream\Encryption::stream_write($data)
Source:lib/private/Files/Stream/Encryption.php#362
public OC\Files\Stream\Encryption::stream_tell()
Source:lib/private/Files/Stream/Encryption.php#413
public OC\Files\Stream\Encryption::stream_seek($offset, $whence=SEEK_SET)
Source:lib/private/Files/Stream/Encryption.php#417
public OC\Files\Stream\Encryption::stream_close()
Source:lib/private/Files/Stream/Encryption.php#452
protected OC\Files\Stream\Encryption::flush($positionPrefix="")
write block to file
Source:

lib/private/Files/Stream/Encryption.php#480

Parameters:
  • $positionPrefix (string)
protected OC\Files\Stream\Encryption::readCache()
read block to file
Source:lib/private/Files/Stream/Encryption.php#509
protected OC\Files\Stream\Encryption::writeHeader()
write header at beginning of encrypted file
Source:lib/private/Files/Stream/Encryption.php#530
Returns:int
Throws:\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException if header key is already in use
protected OC\Files\Stream\Encryption::skipHeader()
read first block to skip the header
Source:lib/private/Files/Stream/Encryption.php#538
protected OC\Files\Stream\Encryption::parentStreamSeek($position)
call stream_seek() from parent class
Source:

lib/private/Files/Stream/Encryption.php#548

Parameters:
  • $position (int)
Returns:

bool

public OC\Files\Stream\Encryption::dir_opendir($path, $options)
Source:

lib/private/Files/Stream/Encryption.php#557

Parameters:
  • $path (string)
  • $options (array)
Returns:

bool