crypt
in
Crypt wrapper class
Table of Contents
$method | Methode zur Verschlüsselung | string |
---|---|---|
$passwd | Passwort für Verschlüsselung | string |
$iv | IV-String für für Verschlüsselung | string |
$hasCrypt | Flag, ob OpenSSL für PHP verfügbvar ist | bool |
$hasConfig | Flag, ob Konfiguratzion verfügbvar ist | bool |
$checkChiphers | Liste von Chipher für Verschlüsselung | array |
__construct() | Konstruktor | bool |
encrypt() | Daten verschlüsseln | string |
decrypt() | Daten entschlüsseln | string |
initCrypt() | Initialisiert Crypt Key und Methode | bool |
simpleEncrypt() | einfache Verschlüsselung via base64_encode und str_rot13 | string |
simpleDecrypt() | einfache Entschlüsselung via base64_decode und str_rot13 | string |
hasCompleteConfig() | Check ob Konfiguration vollständig | bool |
getRandomString() | Return random string by openssl_random_pseudo_bytes | string |
Properties
$method
Methode zur Verschlüsselung
protected
string
$method
= ''
$passwd
Passwort für Verschlüsselung
protected
string
$passwd
= ''
$iv
IV-String für für Verschlüsselung
protected
string
$iv
= ''
$hasCrypt
Flag, ob OpenSSL für PHP verfügbvar ist
protected
bool
$hasCrypt
= false
$hasConfig
Flag, ob Konfiguratzion verfügbvar ist
protected
bool
$hasConfig
= false
$checkChiphers
Liste von Chipher für Verschlüsselung
protected
array
$checkChiphers
= ['aes256', 'aes192', 'aes128', 'blowfish', 'desx', 'des3', 'des']
Methods
__construct()
Konstruktor
public
__construct(
)
: bool
Return values
boolencrypt()
Daten verschlüsseln
public
encrypt(
$data :
string
)
: string
Parameters
- $data : string
Return values
stringdecrypt()
Daten entschlüsseln
public
decrypt(
$data :
string
)
: string
Parameters
- $data : string
Return values
stringinitCrypt()
Initialisiert Crypt Key und Methode
public
initCrypt(
)
: bool
Return values
boolsimpleEncrypt()
einfache Verschlüsselung via base64_encode und str_rot13
private
simpleEncrypt(
$data :
string
)
: string
Parameters
- $data : string
Return values
stringsimpleDecrypt()
einfache Entschlüsselung via base64_decode und str_rot13
private
simpleDecrypt(
$data :
string
)
: string
Parameters
- $data : string
Return values
stringhasCompleteConfig()
Check ob Konfiguration vollständig
private
hasCompleteConfig(
)
: bool
Return values
boolgetRandomString()
Return random string by openssl_random_pseudo_bytes
public
static getRandomString(
[ $length :
int
= 32 ]
)
: string
Parameters
- $length : int = 32