프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$encryption_key | string | Reference to the user's encryption key |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_hash_type | string | Type of hash operation | |
$_mcrypt_cipher | string | Current cipher to be used with mcrypt | |
$_mcrypt_exists | boolean | Flag for the existence of mcrypt | |
$_mcrypt_mode | integer | Method for encrypting/decrypting data |
메소드 | 설명 | |
---|---|---|
__construct ( ) : void | Initialize Encryption class | |
decode ( $string, $key = '' ) : string | Decode | |
encode ( $string, $key = '' ) : string | Encode | |
encode_from_legacy ( $string, $legacy_mode = MCRYPT_MODE_ECB, $key = '' ) : string | Encode from Legacy | |
get_key ( $key = '' ) : string | Fetch the encryption key | |
hash ( $str ) : string | Hash encode a string | |
mcrypt_decode ( $data, $key ) : string | Decrypt using Mcrypt | |
mcrypt_encode ( $data, $key ) : string | Encrypt using Mcrypt | |
set_cipher ( $cipher ) : CI_Encrypt | Set the Mcrypt Cipher | |
set_hash ( $type = 'sha1' ) : void | Set the Hash type | |
set_key ( $key = '' ) : CI_Encrypt | Set the encryption key | |
set_mode ( $mode ) : CI_Encrypt | Set the Mcrypt Mode |
메소드 | 설명 | |
---|---|---|
_add_cipher_noise ( $data, $key ) : string | Adds permuted noise to the IV + encrypted data to protect against Man-in-the-middle attacks on CBC mode ciphers http://www.ciphersbyritter.com/GLOSSARY.HTM#IV | |
_get_cipher ( ) : integer | Get Mcrypt cipher Value | |
_get_mode ( ) : integer | Get Mcrypt Mode Value | |
_remove_cipher_noise ( string $data, string $key ) : string | Removes permuted noise from the IV + encrypted data, reversing _add_cipher_noise() | |
_xor_decode ( $string, $key ) : string | XOR Decode | |
_xor_merge ( $string, $key ) : string | XOR key + string Combiner |
protected _add_cipher_noise ( $data, $key ) : string | ||
리턴 | string |
protected _xor_decode ( $string, $key ) : string | ||
리턴 | string |
protected _xor_merge ( $string, $key ) : string | ||
리턴 | string |
public encode_from_legacy ( $string, $legacy_mode = MCRYPT_MODE_ECB, $key = '' ) : string | ||
리턴 | string |
protected string $_mcrypt_cipher | ||
리턴 | string |
protected bool $_mcrypt_exists | ||
리턴 | boolean |
protected int $_mcrypt_mode | ||
리턴 | integer |
public string $encryption_key | ||
리턴 | string |