Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\Utilities

s2member\includes\classes\utils-encryption.inc.php at line #28

Class c_ws_plugin__s2member_utils_encryption

c_ws_plugin__s2member_utils_encryption

public class c_ws_plugin__s2member_utils_encryption

Encryption utilities.

Since:

3.5


( 5 Methods )
Method Summary
public static str

decrypt(str $base64, str $key)

RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.

public static str

encrypt(str $string, str $key, bool $w_md5_cs)

RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.

public static str

key(str $key)

Determines the proper encryption/decryption Key to use.

public static str

xdecrypt(str $base64, str $key)

XOR two-way encryption/decryption, with a base64 wrapper.

public static str

xencrypt(str $string, str $key, bool $w_md5_cs)

XOR two-way encryption/decryption, with a base64 wrapper.

( 5 Methods )
Method Detail

s2member\includes\classes\utils-encryption.inc.php at line #91

decrypt()

public static str decrypt(str $base64, str $key)

RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.

Falls back on XOR encryption/decryption when mcrypt is not available.

Since:

3.5

Parameters:

str $base64 - A string of data to decrypt. Should still be base64 encoded.

str $key - Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt().

Returns:

str - Decrypted string.

[ back to top ]

s2member\includes\classes\utils-encryption.inc.php at line #59

encrypt()

public static str encrypt(str $string, str $key, bool $w_md5_cs)

RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.

Falls back on XOR encryption/decryption when/if mcrypt is not possible.

Since:

3.5

Parameters:

str $string - A string of data to encrypt.

str $key - Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt().

bool $w_md5_cs - Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string (recommended).

Returns:

str - Encrypted string.

[ back to top ]

s2member\includes\classes\utils-encryption.inc.php at line #39

key()

public static str key(str $key)

Determines the proper encryption/decryption Key to use.

Since:

111106

Parameters:

str $key - Optional. Attempt to force a specific Key. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt().

Returns:

str - Proper encryption/decryption Key. If $key is passed in, and it validates, we'll return that. Otherwise use a default Key.

[ back to top ]

s2member\includes\classes\utils-encryption.inc.php at line #155

xdecrypt()

public static str xdecrypt(str $base64, str $key)

XOR two-way encryption/decryption, with a base64 wrapper.

Since:

3.5

Parameters:

str $base64 - A string of data to decrypt. Should still be base64 encoded.

str $key - Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt().

Returns:

str - Decrypted string.

[ back to top ]

s2member\includes\classes\utils-encryption.inc.php at line #128

xencrypt()

public static str xencrypt(str $string, str $key, bool $w_md5_cs)

XOR two-way encryption/decryption, with a base64 wrapper.

Since:

3.5

Parameters:

str $string - A string of data to encrypt.

str $key - Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt().

bool $w_md5_cs - Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string (recommended).

Returns:

str - Encrypted string.

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail