c_ws_plugin__s2member_utils_encryption
public class c_ws_plugin__s2member_utils_encryption
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. |
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.
3.5
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()
.
str - Decrypted string.
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.
3.5
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).
str - Encrypted string.
public static str key(str $key)
Determines the proper encryption/decryption Key to use.
111106
str $key - Optional. Attempt to force a specific Key. Defaults to the one configured for s2Member. Short of that, defaults to: wp_salt()
.
str - Proper encryption/decryption Key. If $key
is passed in, and it validates, we'll return that. Otherwise use a default Key.
public static str xdecrypt(str $base64, str $key)
XOR two-way encryption/decryption, with a base64 wrapper.
3.5
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()
.
str - Decrypted string.
public static str xencrypt(str $string, str $key, bool $w_md5_cs)
XOR two-way encryption/decryption, with a base64 wrapper.
3.5
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).
str - Encrypted string.
Encryption utilities.