public class McryptModule extends AbstractQuercusModule
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MCRYPT_3DES |
static java.lang.String |
MCRYPT_ARCFOUR |
static java.lang.String |
MCRYPT_BLOWFISH |
static int |
MCRYPT_DECRYPT |
static java.lang.String |
MCRYPT_DES |
static int |
MCRYPT_DEV_RANDOM |
static int |
MCRYPT_DEV_URANDOM |
static int |
MCRYPT_ENCRYPT |
static java.lang.String |
MCRYPT_MODE_CBC |
static java.lang.String |
MCRYPT_MODE_CFB |
static java.lang.String |
MCRYPT_MODE_ECB |
static java.lang.String |
MCRYPT_MODE_NOFB |
static java.lang.String |
MCRYPT_MODE_OFB |
static java.lang.String |
MCRYPT_MODE_STREAM |
static int |
MCRYPT_RAND |
static java.lang.String |
MCRYPT_RC4 |
static java.lang.String |
MCRYPT_RIJNDAEL_128 |
static java.lang.String |
MCRYPT_RIJNDAEL_192 |
static java.lang.String |
MCRYPT_RIJNDAEL_256 |
static java.lang.String |
MCRYPT_TRIPLEDES |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
McryptModule() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLoadedExtensions()
Returns the extensions loaded by the module.
|
static StringValue |
mcrypt_cbc(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
int mode,
byte[] iv)
Encrypt with cbc
|
static StringValue |
mcrypt_cfb(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
int mode,
byte[] iv)
Encrypt with cfb
|
static StringValue |
mcrypt_create_iv(Env env,
int size,
int randomMode)
Creates the IV vector.
|
static StringValue |
mcrypt_decrypt(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
java.lang.String mode,
byte[] iv)
Decrypt
|
static StringValue |
mcrypt_ecb(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
int mode,
byte[] iv)
Encrypt with cfb
|
static java.lang.String |
mcrypt_enc_get_algorithms_name(Mcrypt mcrypt)
Returns the algorithms name
|
static int |
mcrypt_enc_get_block_size(Mcrypt mcrypt)
Returns the block size
|
static int |
mcrypt_enc_get_iv_size(Mcrypt mcrypt)
Returns the IV size
|
static int |
mcrypt_enc_get_key_size(Mcrypt mcrypt)
Returns the key size
|
static java.lang.String |
mcrypt_enc_get_modes_name(Mcrypt mcrypt)
Returns the mode name
|
static Value |
mcrypt_enc_get_supported_key_sizes(Mcrypt mcrypt)
Returns the supported key sizes
|
static boolean |
mcrypt_enc_is_block_algorithm_mode(Mcrypt mcrypt)
Returns true for block encoding modes
|
static boolean |
mcrypt_enc_is_block_algorithm(Mcrypt mcrypt)
Returns true for block encoding modes
|
static boolean |
mcrypt_enc_is_block_mode(Mcrypt mcrypt)
Returns true for block output modes
|
static boolean |
mcrypt_enc_self_test(Mcrypt mcrypt)
Returns true for block output modes
|
static StringValue |
mcrypt_encrypt(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
java.lang.String mode,
byte[] iv)
Encrypt
|
static boolean |
mcrypt_generic_deinit(Mcrypt mcrypt)
Initialize encrption
|
static boolean |
mcrypt_generic_end(Mcrypt mcrypt)
Closes the module
|
static Value |
mcrypt_generic_init(Mcrypt mcrypt,
byte[] key,
byte[] iv)
Initialize encrption
|
static StringValue |
mcrypt_generic(Env env,
Mcrypt mcrypt,
byte[] data)
Initialize encrption
|
static Value |
mcrypt_get_block_size(Env env,
java.lang.String cipher,
java.lang.String mode) |
static java.lang.String |
mcrypt_get_cipher_name(Env env,
java.lang.String cipher) |
static Value |
mcrypt_get_iv_size(Env env,
java.lang.String cipher,
java.lang.String mode) |
static Value |
mcrypt_get_key_size(Env env,
java.lang.String cipher,
java.lang.String mode) |
static Value |
mcrypt_list_algorithms(Env env)
Lists the available algorithms
|
static Value |
mcrypt_list_modes(Env env)
Lists the available modes.
|
static boolean |
mcrypt_module_close(Mcrypt mcrypt)
Closes the module
|
static int |
mcrypt_module_get_algo_block_size(Env env,
java.lang.String cipher,
java.lang.String libDir)
Returns the block size for an algorithm.
|
static int |
mcrypt_module_get_algo_key_size(Env env,
java.lang.String cipher,
java.lang.String libDir)
Returns the key size for an algorithm.
|
static Value |
mcrypt_module_get_supported_key_sizes(Env env,
java.lang.String cipher,
java.lang.String libDir)
Returns the key size for an algorithm.
|
static boolean |
mcrypt_module_is_block_algorithm_mode(Env env,
java.lang.String mode,
java.lang.String libDir)
Returns true for block modes
|
static boolean |
mcrypt_module_is_block_algorithm(Env env,
java.lang.String cipher,
java.lang.String libDir)
Returns true for block algorithms
|
static boolean |
mcrypt_module_is_block_mode(Env env,
java.lang.String mode,
java.lang.String libDir)
Returns true for block modes
|
static Value |
mcrypt_module_open(Env env,
java.lang.String algorithm,
Path algorithm_directory,
java.lang.String mode,
Path mode_directory)
Open a new mcrypt object.
|
static boolean |
mcrypt_module_self_test(Env env,
java.lang.String algorithm,
Path libDir)
Returns true for block modes
|
static StringValue |
mcrypt_ofb(Env env,
java.lang.String cipher,
byte[] key,
byte[] data,
int mode,
byte[] iv)
Encrypt with ofb
|
static Value |
mdecrypt_generic(Env env,
Mcrypt mcrypt,
byte[] data)
Initialize encrption
|
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
public static final int MCRYPT_DEV_RANDOM
public static final int MCRYPT_DEV_URANDOM
public static final int MCRYPT_RAND
public static final int MCRYPT_ENCRYPT
public static final int MCRYPT_DECRYPT
public static final java.lang.String MCRYPT_MODE_ECB
public static final java.lang.String MCRYPT_MODE_CBC
public static final java.lang.String MCRYPT_MODE_CFB
public static final java.lang.String MCRYPT_MODE_OFB
public static final java.lang.String MCRYPT_MODE_NOFB
public static final java.lang.String MCRYPT_MODE_STREAM
public static final java.lang.String MCRYPT_ARCFOUR
public static final java.lang.String MCRYPT_BLOWFISH
public static final java.lang.String MCRYPT_DES
public static final java.lang.String MCRYPT_3DES
public static final java.lang.String MCRYPT_TRIPLEDES
public static final java.lang.String MCRYPT_RC4
public static final java.lang.String MCRYPT_RIJNDAEL_128
public static final java.lang.String MCRYPT_RIJNDAEL_192
public static final java.lang.String MCRYPT_RIJNDAEL_256
public java.lang.String[] getLoadedExtensions()
AbstractQuercusModule
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public static StringValue mcrypt_cbc(Env env, java.lang.String cipher, byte[] key, byte[] data, int mode, byte[] iv)
public static StringValue mcrypt_cfb(Env env, java.lang.String cipher, byte[] key, byte[] data, int mode, byte[] iv)
public static StringValue mcrypt_create_iv(Env env, int size, int randomMode)
public static StringValue mcrypt_decrypt(Env env, java.lang.String cipher, byte[] key, byte[] data, java.lang.String mode, byte[] iv)
public static StringValue mcrypt_ecb(Env env, java.lang.String cipher, byte[] key, byte[] data, int mode, byte[] iv)
public static java.lang.String mcrypt_enc_get_algorithms_name(Mcrypt mcrypt)
public static int mcrypt_enc_get_block_size(Mcrypt mcrypt)
public static int mcrypt_enc_get_iv_size(Mcrypt mcrypt)
public static int mcrypt_enc_get_key_size(Mcrypt mcrypt)
public static java.lang.String mcrypt_enc_get_modes_name(Mcrypt mcrypt)
public static Value mcrypt_enc_get_supported_key_sizes(Mcrypt mcrypt)
public static boolean mcrypt_enc_is_block_algorithm(Mcrypt mcrypt)
public static boolean mcrypt_enc_is_block_algorithm_mode(Mcrypt mcrypt)
public static boolean mcrypt_enc_is_block_mode(Mcrypt mcrypt)
public static boolean mcrypt_enc_self_test(Mcrypt mcrypt)
public static StringValue mcrypt_encrypt(Env env, java.lang.String cipher, byte[] key, byte[] data, java.lang.String mode, byte[] iv)
public static StringValue mcrypt_generic(Env env, Mcrypt mcrypt, byte[] data)
public static boolean mcrypt_generic_deinit(Mcrypt mcrypt)
public static Value mcrypt_generic_init(Mcrypt mcrypt, byte[] key, byte[] iv)
public static boolean mcrypt_generic_end(Mcrypt mcrypt)
public static Value mcrypt_get_block_size(Env env, java.lang.String cipher, java.lang.String mode)
public static java.lang.String mcrypt_get_cipher_name(Env env, java.lang.String cipher)
public static Value mcrypt_get_iv_size(Env env, java.lang.String cipher, java.lang.String mode)
public static Value mcrypt_get_key_size(Env env, java.lang.String cipher, java.lang.String mode)
public static Value mcrypt_list_algorithms(Env env)
public static boolean mcrypt_module_close(Mcrypt mcrypt)
public static int mcrypt_module_get_algo_block_size(Env env, java.lang.String cipher, java.lang.String libDir)
public static int mcrypt_module_get_algo_key_size(Env env, java.lang.String cipher, java.lang.String libDir)
public static Value mcrypt_module_get_supported_key_sizes(Env env, java.lang.String cipher, java.lang.String libDir)
public static boolean mcrypt_module_is_block_algorithm(Env env, java.lang.String cipher, java.lang.String libDir)
public static boolean mcrypt_module_is_block_algorithm_mode(Env env, java.lang.String mode, java.lang.String libDir)
public static boolean mcrypt_module_is_block_mode(Env env, java.lang.String mode, java.lang.String libDir)
public static boolean mcrypt_module_self_test(Env env, java.lang.String algorithm, Path libDir)
public static Value mcrypt_module_open(Env env, java.lang.String algorithm, Path algorithm_directory, java.lang.String mode, Path mode_directory)
public static StringValue mcrypt_ofb(Env env, java.lang.String cipher, byte[] key, byte[] data, int mode, byte[] iv)