\Pydio\Core\UtilsCrypto

Simple encrypt / decrypt utils for small strings Legacy is using mcrypt Rijndael_256, will be replaced by openssl or libsodium with standard cypher

Summary

Methods
Properties
Constants
getApplicationSecret()
getCliSecret()
getRandomSalt()
hasCBCEnctypeHeader()
buildKey()
encrypt()
decrypt()
No public properties found
HEADER_CBC_128
getDataHeader()
No protected properties found
N/A
removeCBCEnctypeHeader()
No private properties found
N/A

Constants

HEADER_CBC_128

HEADER_CBC_128

Methods

getApplicationSecret()

getApplicationSecret() : string

Returns

string

getCliSecret()

getCliSecret() : string

Returns

string

getRandomSalt()

getRandomSalt(boolean  $base64encode = true,   $size = 32) : string

Parameters

boolean $base64encode
$size

Returns

string

hasCBCEnctypeHeader()

hasCBCEnctypeHeader(  $data) : boolean

Parameters

$data

Returns

boolean

buildKey()

buildKey(string  $userKey, string  $secret, null  $encodedData = null) : array|boolean|string

Builds a key using various methods depending on legacy status or not

Parameters

string $userKey
string $secret
null $encodedData

Returns

array|boolean|string

encrypt()

encrypt(mixed  $data, string  $key, boolean  $base64encode = true) : mixed

Parameters

mixed $data
string $key
boolean $base64encode

Returns

mixed

decrypt()

decrypt(string  $data, string  $key, boolean  $base64encoded = true) : mixed

Parameters

string $data
string $key
boolean $base64encoded

Returns

mixed

getDataHeader()

getDataHeader() : string

Returns

string

removeCBCEnctypeHeader()

removeCBCEnctypeHeader(  $data) : boolean

Parameters

$data

Returns

boolean