LSSodium

package

Default

Methods

Check if encryption key exists in configuration

checkIfKeyExists() : boolean

Response

boolean

Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString

Check if Sodium library is installed

checkIfLibraryExists() : boolean

Response

boolean

Decrypt encrypted string.

decrypt(string $sEncryptedString, boolean $bReturnFalseIfError = false) : string

Arguments

$sEncryptedString

string

Encrypted string to decrypt

$bReturnFalseIfError

boolean

false by default. If TRUE, return false in case of error (bad decryption). Else, return given $encryptedInput value

Response

string

Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString

Encrypt input data using AES256 CBC encryption

encrypt(\unknown_type $sDataToEncrypt) : string

Arguments

$sDataToEncrypt

\unknown_type

Data to encrypt. Could be a string or a serializable PHP object

Response

string

Return encrypted AES256 CBC value

Write encryption key to version.php config file

generateEncryptionKeys() 

Get encryption key from version.php config file

getEncryptionKey() : string

Response

string

Return encryption key string

Get encryption key from version.php config file

getEncryptionPublicKey() : string

Response

string

Return encryption key string

Get encryption key from version.php config file

getEncryptionSecretKey() : string

Response

string

Return encryption key string

init

init() 

Properties

bLibraryExists

bLibraryExists : 

Type(s)

sEncryptionKeypair

sEncryptionKeypair : 

Type(s)

sEncryptionPublicKey

sEncryptionPublicKey : 

Type(s)

sEncryptionSecretKey

sEncryptionSecretKey : 

Type(s)