OpenSsl
extends Component
in package
AbstractYes
Tags
Table of Contents
Constants
- CIPHER_METHOD_AES_128_CBC = 'AES-128-CBC'
- CIPHER_METHOD_AES_128_CBC_HMAC_SHA1 = 'AES-128-CBC-HMAC-SHA1'
- CIPHER_METHOD_AES_128_CBC_HMAC_SHA256 = 'AES-128-CBC-HMAC-SHA256'
- CIPHER_METHOD_AES_128_CFB = 'AES-128-CFB'
- CIPHER_METHOD_AES_128_CFB1 = 'AES-128-CFB1'
- CIPHER_METHOD_AES_128_CFB8 = 'AES-128-CFB8'
- CIPHER_METHOD_AES_128_CTR = 'AES-128-CTR'
- CIPHER_METHOD_AES_128_ECB = 'AES-128-ECB'
- CIPHER_METHOD_AES_128_OFB = 'AES-128-OFB'
- CIPHER_METHOD_AES_192_CBC = 'AES-192-CBC'
- CIPHER_METHOD_AES_192_CFB = 'AES-192-CFB'
- CIPHER_METHOD_AES_192_CFB1 = 'AES-192-CFB1'
- CIPHER_METHOD_AES_192_CFB8 = 'AES-192-CFB8'
- CIPHER_METHOD_AES_192_ECB = 'AES-192-ECB'
- CIPHER_METHOD_AES_192_OFB = 'AES-192-OFB'
- CIPHER_METHOD_AES_256_CBC = 'AES-256-CBC'
- CIPHER_METHOD_AES_256_CBC_HMAC_SHA1 = 'AES-256-CBC-HMAC-SHA1'
- CIPHER_METHOD_AES_256_CBC_HMAC_SHA256 = 'AES-256-CBC-HMAC-SHA256'
- CIPHER_METHOD_AES_256_CFB = 'AES-256-CFB'
- CIPHER_METHOD_AES_256_CFB1 = 'AES-256-CFB1'
- CIPHER_METHOD_AES_256_CFB8 = 'AES-256-CFB8'
- CIPHER_METHOD_AES_256_ECB = 'AES-256-ECB'
- CIPHER_METHOD_AES_256_OFB = 'AES-256-OFB'
- CIPHER_METHOD_BF_CBC = 'BF-CBC'
- CIPHER_METHOD_BF_CFB = 'BF-CFB'
- CIPHER_METHOD_BF_ECB = 'BF-ECB'
- CIPHER_METHOD_BF_OFB = 'BF-OFB'
- CIPHER_METHOD_CAST5_CBC = 'CAST5-CBC'
- CIPHER_METHOD_CAST5_CFB = 'CAST5-CFB'
- CIPHER_METHOD_CAST5_ECB = 'CAST5-ECB'
- CIPHER_METHOD_CAST5_OFB = 'CAST5-OFB'
- CIPHER_METHOD_DES_CBC = 'DES-CBC'
- CIPHER_METHOD_DES_CFB = 'DES-CFB'
- CIPHER_METHOD_DES_CFB1 = 'DES-CFB1'
- CIPHER_METHOD_DES_CFB8 = 'DES-CFB8'
- CIPHER_METHOD_DES_ECB = 'DES-ECB'
- CIPHER_METHOD_DES_EDE = 'DES-EDE'
- CIPHER_METHOD_DES_EDE3 = 'DES-EDE3'
- CIPHER_METHOD_DES_EDE3_CBC = 'DES-EDE3-CBC'
- CIPHER_METHOD_DES_EDE3_CFB = 'DES-EDE3-CFB'
- CIPHER_METHOD_DES_EDE3_OFB = 'DES-EDE3-OFB'
- CIPHER_METHOD_DES_EDE_CBC = 'DES-EDE-CBC'
- CIPHER_METHOD_DES_EDE_CFB = 'DES-EDE-CFB'
- CIPHER_METHOD_DES_EDE_OFB = 'DES-EDE-OFB'
- CIPHER_METHOD_DES_OFB = 'DES-OFB'
- CIPHER_METHOD_DESX_CBC = 'DESX-CBC'
- CIPHER_METHOD_IDEA_CBC = 'IDEA-CBC'
- CIPHER_METHOD_IDEA_CFB = 'IDEA-CFB'
- CIPHER_METHOD_IDEA_ECB = 'IDEA-ECB'
- CIPHER_METHOD_IDEA_OFB = 'IDEA-OFB'
- CIPHER_METHOD_RC2_40_CBC = 'RC2-40-CBC'
- CIPHER_METHOD_RC2_64_CBC = 'RC2-64-CBC'
- CIPHER_METHOD_RC2_CBC = 'RC2-CBC'
- CIPHER_METHOD_RC2_CFB = 'RC2-CFB'
- CIPHER_METHOD_RC2_ECB = 'RC2-ECB'
- CIPHER_METHOD_RC2_OFB = 'RC2-OFB'
- CIPHER_METHOD_RC4 = 'RC4'
- CIPHER_METHOD_RC4_40 = 'RC4-40'
- DIGEST_METHOD_DSA = 'DSA'
- DIGEST_METHOD_DSA_SHA = 'DSA-SHA'
- DIGEST_METHOD_MD2 = 'MD2'
- DIGEST_METHOD_MD4 = 'MD4'
- DIGEST_METHOD_MD5 = 'MD5'
- DIGEST_METHOD_RIPEMD160 = 'RIPEMD160'
- DIGEST_METHOD_SHA = 'SHA'
- DIGEST_METHOD_SHA1 = 'SHA1'
- DIGEST_METHOD_SHA224 = 'SHA224'
- DIGEST_METHOD_SHA256 = 'SHA256'
- DIGEST_METHOD_SHA384 = 'SHA384'
- DIGEST_METHOD_SHA512 = 'SHA512'
- OPEN_SSL_PASSWORD = '8d85a81fb6dcadef22e9c8a376c7c1d9755c3fb567c706f4d84290982ad0dbda'
Properties
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- decrypt() : string
- encrypt() : string
- extends() : bool
- getReflection() : ReflectionClass
- randomPseudoBytes() : string
- init() : mixed
Constants
CIPHER_METHOD_AES_128_CBC
public
mixed
CIPHER_METHOD_AES_128_CBC
= 'AES-128-CBC'
CIPHER_METHOD_AES_128_CBC_HMAC_SHA1
public
mixed
CIPHER_METHOD_AES_128_CBC_HMAC_SHA1
= 'AES-128-CBC-HMAC-SHA1'
CIPHER_METHOD_AES_128_CBC_HMAC_SHA256
public
mixed
CIPHER_METHOD_AES_128_CBC_HMAC_SHA256
= 'AES-128-CBC-HMAC-SHA256'
CIPHER_METHOD_AES_128_CFB
public
mixed
CIPHER_METHOD_AES_128_CFB
= 'AES-128-CFB'
CIPHER_METHOD_AES_128_CFB1
public
mixed
CIPHER_METHOD_AES_128_CFB1
= 'AES-128-CFB1'
CIPHER_METHOD_AES_128_CFB8
public
mixed
CIPHER_METHOD_AES_128_CFB8
= 'AES-128-CFB8'
CIPHER_METHOD_AES_128_CTR
public
mixed
CIPHER_METHOD_AES_128_CTR
= 'AES-128-CTR'
CIPHER_METHOD_AES_128_ECB
public
mixed
CIPHER_METHOD_AES_128_ECB
= 'AES-128-ECB'
CIPHER_METHOD_AES_128_OFB
public
mixed
CIPHER_METHOD_AES_128_OFB
= 'AES-128-OFB'
CIPHER_METHOD_AES_192_CBC
public
mixed
CIPHER_METHOD_AES_192_CBC
= 'AES-192-CBC'
CIPHER_METHOD_AES_192_CFB
public
mixed
CIPHER_METHOD_AES_192_CFB
= 'AES-192-CFB'
CIPHER_METHOD_AES_192_CFB1
public
mixed
CIPHER_METHOD_AES_192_CFB1
= 'AES-192-CFB1'
CIPHER_METHOD_AES_192_CFB8
public
mixed
CIPHER_METHOD_AES_192_CFB8
= 'AES-192-CFB8'
CIPHER_METHOD_AES_192_ECB
public
mixed
CIPHER_METHOD_AES_192_ECB
= 'AES-192-ECB'
CIPHER_METHOD_AES_192_OFB
public
mixed
CIPHER_METHOD_AES_192_OFB
= 'AES-192-OFB'
CIPHER_METHOD_AES_256_CBC
public
mixed
CIPHER_METHOD_AES_256_CBC
= 'AES-256-CBC'
CIPHER_METHOD_AES_256_CBC_HMAC_SHA1
public
mixed
CIPHER_METHOD_AES_256_CBC_HMAC_SHA1
= 'AES-256-CBC-HMAC-SHA1'
CIPHER_METHOD_AES_256_CBC_HMAC_SHA256
public
mixed
CIPHER_METHOD_AES_256_CBC_HMAC_SHA256
= 'AES-256-CBC-HMAC-SHA256'
CIPHER_METHOD_AES_256_CFB
public
mixed
CIPHER_METHOD_AES_256_CFB
= 'AES-256-CFB'
CIPHER_METHOD_AES_256_CFB1
public
mixed
CIPHER_METHOD_AES_256_CFB1
= 'AES-256-CFB1'
CIPHER_METHOD_AES_256_CFB8
public
mixed
CIPHER_METHOD_AES_256_CFB8
= 'AES-256-CFB8'
CIPHER_METHOD_AES_256_ECB
public
mixed
CIPHER_METHOD_AES_256_ECB
= 'AES-256-ECB'
CIPHER_METHOD_AES_256_OFB
public
mixed
CIPHER_METHOD_AES_256_OFB
= 'AES-256-OFB'
CIPHER_METHOD_BF_CBC
public
mixed
CIPHER_METHOD_BF_CBC
= 'BF-CBC'
CIPHER_METHOD_BF_CFB
public
mixed
CIPHER_METHOD_BF_CFB
= 'BF-CFB'
CIPHER_METHOD_BF_ECB
public
mixed
CIPHER_METHOD_BF_ECB
= 'BF-ECB'
CIPHER_METHOD_BF_OFB
public
mixed
CIPHER_METHOD_BF_OFB
= 'BF-OFB'
CIPHER_METHOD_CAST5_CBC
public
mixed
CIPHER_METHOD_CAST5_CBC
= 'CAST5-CBC'
CIPHER_METHOD_CAST5_CFB
public
mixed
CIPHER_METHOD_CAST5_CFB
= 'CAST5-CFB'
CIPHER_METHOD_CAST5_ECB
public
mixed
CIPHER_METHOD_CAST5_ECB
= 'CAST5-ECB'
CIPHER_METHOD_CAST5_OFB
public
mixed
CIPHER_METHOD_CAST5_OFB
= 'CAST5-OFB'
CIPHER_METHOD_DES_CBC
public
mixed
CIPHER_METHOD_DES_CBC
= 'DES-CBC'
CIPHER_METHOD_DES_CFB
public
mixed
CIPHER_METHOD_DES_CFB
= 'DES-CFB'
CIPHER_METHOD_DES_CFB1
public
mixed
CIPHER_METHOD_DES_CFB1
= 'DES-CFB1'
CIPHER_METHOD_DES_CFB8
public
mixed
CIPHER_METHOD_DES_CFB8
= 'DES-CFB8'
CIPHER_METHOD_DES_ECB
public
mixed
CIPHER_METHOD_DES_ECB
= 'DES-ECB'
CIPHER_METHOD_DES_EDE
public
mixed
CIPHER_METHOD_DES_EDE
= 'DES-EDE'
CIPHER_METHOD_DES_EDE3
public
mixed
CIPHER_METHOD_DES_EDE3
= 'DES-EDE3'
CIPHER_METHOD_DES_EDE3_CBC
public
mixed
CIPHER_METHOD_DES_EDE3_CBC
= 'DES-EDE3-CBC'
CIPHER_METHOD_DES_EDE3_CFB
public
mixed
CIPHER_METHOD_DES_EDE3_CFB
= 'DES-EDE3-CFB'
CIPHER_METHOD_DES_EDE3_OFB
public
mixed
CIPHER_METHOD_DES_EDE3_OFB
= 'DES-EDE3-OFB'
CIPHER_METHOD_DES_EDE_CBC
public
mixed
CIPHER_METHOD_DES_EDE_CBC
= 'DES-EDE-CBC'
CIPHER_METHOD_DES_EDE_CFB
public
mixed
CIPHER_METHOD_DES_EDE_CFB
= 'DES-EDE-CFB'
CIPHER_METHOD_DES_EDE_OFB
public
mixed
CIPHER_METHOD_DES_EDE_OFB
= 'DES-EDE-OFB'
CIPHER_METHOD_DES_OFB
public
mixed
CIPHER_METHOD_DES_OFB
= 'DES-OFB'
CIPHER_METHOD_DESX_CBC
public
mixed
CIPHER_METHOD_DESX_CBC
= 'DESX-CBC'
CIPHER_METHOD_IDEA_CBC
public
mixed
CIPHER_METHOD_IDEA_CBC
= 'IDEA-CBC'
CIPHER_METHOD_IDEA_CFB
public
mixed
CIPHER_METHOD_IDEA_CFB
= 'IDEA-CFB'
CIPHER_METHOD_IDEA_ECB
public
mixed
CIPHER_METHOD_IDEA_ECB
= 'IDEA-ECB'
CIPHER_METHOD_IDEA_OFB
public
mixed
CIPHER_METHOD_IDEA_OFB
= 'IDEA-OFB'
CIPHER_METHOD_RC2_40_CBC
public
mixed
CIPHER_METHOD_RC2_40_CBC
= 'RC2-40-CBC'
CIPHER_METHOD_RC2_64_CBC
public
mixed
CIPHER_METHOD_RC2_64_CBC
= 'RC2-64-CBC'
CIPHER_METHOD_RC2_CBC
public
mixed
CIPHER_METHOD_RC2_CBC
= 'RC2-CBC'
CIPHER_METHOD_RC2_CFB
public
mixed
CIPHER_METHOD_RC2_CFB
= 'RC2-CFB'
CIPHER_METHOD_RC2_ECB
public
mixed
CIPHER_METHOD_RC2_ECB
= 'RC2-ECB'
CIPHER_METHOD_RC2_OFB
public
mixed
CIPHER_METHOD_RC2_OFB
= 'RC2-OFB'
CIPHER_METHOD_RC4
public
mixed
CIPHER_METHOD_RC4
= 'RC4'
CIPHER_METHOD_RC4_40
public
mixed
CIPHER_METHOD_RC4_40
= 'RC4-40'
DIGEST_METHOD_DSA
public
mixed
DIGEST_METHOD_DSA
= 'DSA'
DIGEST_METHOD_DSA_SHA
public
mixed
DIGEST_METHOD_DSA_SHA
= 'DSA-SHA'
DIGEST_METHOD_MD2
public
mixed
DIGEST_METHOD_MD2
= 'MD2'
DIGEST_METHOD_MD4
public
mixed
DIGEST_METHOD_MD4
= 'MD4'
DIGEST_METHOD_MD5
public
mixed
DIGEST_METHOD_MD5
= 'MD5'
DIGEST_METHOD_RIPEMD160
public
mixed
DIGEST_METHOD_RIPEMD160
= 'RIPEMD160'
DIGEST_METHOD_SHA
public
mixed
DIGEST_METHOD_SHA
= 'SHA'
DIGEST_METHOD_SHA1
public
mixed
DIGEST_METHOD_SHA1
= 'SHA1'
DIGEST_METHOD_SHA224
public
mixed
DIGEST_METHOD_SHA224
= 'SHA224'
DIGEST_METHOD_SHA256
public
mixed
DIGEST_METHOD_SHA256
= 'SHA256'
DIGEST_METHOD_SHA384
public
mixed
DIGEST_METHOD_SHA384
= 'SHA384'
DIGEST_METHOD_SHA512
public
mixed
DIGEST_METHOD_SHA512
= 'SHA512'
OPEN_SSL_PASSWORD
public
mixed
OPEN_SSL_PASSWORD
= '8d85a81fb6dcadef22e9c8a376c7c1d9755c3fb567c706f4d84290982ad0dbda'
Properties
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
decrypt()
public
static decrypt(string $encrypted_data[, string $method = OpenSsl::CIPHER_METHOD_AES_256_ECB ][, string $password = OpenSsl::OPEN_SSL_PASSWORD ][, number $options = 0 ][, string $iv = '' ][, string $tag = '' ][, string $additional_authentication_data = '' ]) : string
Parameters
- $encrypted_data : string
- $method : string = OpenSsl::CIPHER_METHOD_AES_256_ECB
- $password : string = OpenSsl::OPEN_SSL_PASSWORD
- $options : number = 0
- $iv : string = ''
- $tag : string = ''
- $additional_authentication_data : string = ''
Tags
Return values
stringencrypt()
public
static encrypt(string $data[, string $method = OpenSsl::CIPHER_METHOD_AES_256_ECB ][, string $password = OpenSsl::OPEN_SSL_PASSWORD ][, int $options = 0 ][, string $iv = '' ][, string &$tag = NULL ][, string $additional_authentication_data = '' ][, number $tag_length = 16 ]) : string
Parameters
- $data : string
-
The data that is to be encrypted
- $method : string = OpenSsl::CIPHER_METHOD_AES_256_ECB
-
The cipher method to use in encrypting the data
- $password : string = OpenSsl::OPEN_SSL_PASSWORD
- $options : int = 0
- $iv : string = ''
- $tag : string = NULL
- $additional_authentication_data : string = ''
- $tag_length : number = 16
Tags
Return values
stringextends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassrandomPseudoBytes()
public
static randomPseudoBytes([int $length = 32 ][, mixed &$crypto_strong = "" ]) : string
Parameters
- $length : int = 32
- $crypto_strong : mixed = ""
Return values
stringinit()
protected
init() : mixed