Documentation

Crypt
in package

Cryptography utility class.

Table of Contents

Constants

EncryptionAlgBase64  = 'base64'
Encryption algorithm: Base64 encoding.
EncryptionAlgHex  = 'hex'
Encryption algorithm: Hexadecimal encoding.

Methods

Decrypt()  : string
Decrypts data.
Encrypt()  : string
Encrypts data.

Constants

EncryptionAlgBase64

Encryption algorithm: Base64 encoding.

public mixed EncryptionAlgBase64 = 'base64'

EncryptionAlgHex

Encryption algorithm: Hexadecimal encoding.

public mixed EncryptionAlgHex = 'hex'

Methods

Decrypt()

Decrypts data.

public static Decrypt(string $key, string $data[, string $stringifyMethod = self::EncryptionAlgBase64 ]) : string
Parameters
$key : string

The key.

$data : string

The data to decrypt.

$stringifyMethod : string = self::EncryptionAlgBase64

The method for converting to string.

Return values
string

The decrypted data.

Encrypt()

Encrypts data.

public static Encrypt(string $key, string $data[, string $stringifyMethod = self::EncryptionAlgBase64 ]) : string
Parameters
$key : string

The key.

$data : string

The data to encrypt.

$stringifyMethod : string = self::EncryptionAlgBase64

The method for converting to string.

Return values
string

The encrypted data.


        
On this page

Search results