com.caucho.quercus.lib
Class MhashModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.MhashModule
All Implemented Interfaces:
QuercusModule

public class MhashModule
extends AbstractQuercusModule

Mhash functions. This module uses the MessageDigest class to calculate digests. Typical java installations support MD2, MD5, SHA1, SHA256, SHA384, and SHA512.


Nested Class Summary
static class MhashModule.MhashAlgorithm
           
 
Field Summary
static int MHASH_ADLER32
           
static int MHASH_CRC32
           
static int MHASH_CRC32B
           
static int MHASH_GOST
           
static int MHASH_HAVAL128
           
static int MHASH_HAVAL160
           
static int MHASH_HAVAL192
           
static int MHASH_HAVAL224
           
static int MHASH_HAVAL256
           
static int MHASH_MD2
           
static int MHASH_MD4
           
static int MHASH_MD5
           
static int MHASH_RIPEMD128
           
static int MHASH_RIPEMD160
           
static int MHASH_RIPEMD256
           
static int MHASH_RIPEMD320
           
static int MHASH_SHA1
           
static int MHASH_SHA224
           
static int MHASH_SHA256
           
static int MHASH_SHA384
           
static int MHASH_SHA512
           
static int MHASH_SNEFRU128
           
static int MHASH_SNEFRU256
           
static int MHASH_TIGER
           
static int MHASH_TIGER128
           
static int MHASH_TIGER160
           
static int MHASH_WHIRLPOOL
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
MhashModule()
           
 
Method Summary
 java.lang.String[] getLoadedExtensions()
          Returns the extensions loaded by the module.
 int mhash_count()
          Returns the highest available hash id.
 Value mhash_get_block_size(int hash)
           
 Value mhash_get_hash_name(Env env, int hash)
           
 Value mhash(Env env, int hash, StringValue data, java.lang.String key)
           
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MHASH_CRC32

public static final int MHASH_CRC32
See Also:
Constant Field Values

MHASH_MD5

public static final int MHASH_MD5
See Also:
Constant Field Values

MHASH_SHA1

public static final int MHASH_SHA1
See Also:
Constant Field Values

MHASH_HAVAL256

public static final int MHASH_HAVAL256
See Also:
Constant Field Values

MHASH_RIPEMD160

public static final int MHASH_RIPEMD160
See Also:
Constant Field Values

MHASH_TIGER

public static final int MHASH_TIGER
See Also:
Constant Field Values

MHASH_GOST

public static final int MHASH_GOST
See Also:
Constant Field Values

MHASH_CRC32B

public static final int MHASH_CRC32B
See Also:
Constant Field Values

MHASH_HAVAL224

public static final int MHASH_HAVAL224
See Also:
Constant Field Values

MHASH_HAVAL192

public static final int MHASH_HAVAL192
See Also:
Constant Field Values

MHASH_HAVAL160

public static final int MHASH_HAVAL160
See Also:
Constant Field Values

MHASH_HAVAL128

public static final int MHASH_HAVAL128
See Also:
Constant Field Values

MHASH_TIGER128

public static final int MHASH_TIGER128
See Also:
Constant Field Values

MHASH_TIGER160

public static final int MHASH_TIGER160
See Also:
Constant Field Values

MHASH_MD4

public static final int MHASH_MD4
See Also:
Constant Field Values

MHASH_SHA256

public static final int MHASH_SHA256
See Also:
Constant Field Values

MHASH_ADLER32

public static final int MHASH_ADLER32
See Also:
Constant Field Values

MHASH_SHA224

public static final int MHASH_SHA224
See Also:
Constant Field Values

MHASH_SHA512

public static final int MHASH_SHA512
See Also:
Constant Field Values

MHASH_SHA384

public static final int MHASH_SHA384
See Also:
Constant Field Values

MHASH_WHIRLPOOL

public static final int MHASH_WHIRLPOOL
See Also:
Constant Field Values

MHASH_RIPEMD128

public static final int MHASH_RIPEMD128
See Also:
Constant Field Values

MHASH_RIPEMD256

public static final int MHASH_RIPEMD256
See Also:
Constant Field Values

MHASH_RIPEMD320

public static final int MHASH_RIPEMD320
See Also:
Constant Field Values

MHASH_SNEFRU128

public static final int MHASH_SNEFRU128
See Also:
Constant Field Values

MHASH_SNEFRU256

public static final int MHASH_SNEFRU256
See Also:
Constant Field Values

MHASH_MD2

public static final int MHASH_MD2
See Also:
Constant Field Values
Constructor Detail

MhashModule

public MhashModule()
Method Detail

getLoadedExtensions

public java.lang.String[] getLoadedExtensions()
Description copied from class: AbstractQuercusModule
Returns the extensions loaded by the module.

Specified by:
getLoadedExtensions in interface QuercusModule
Overrides:
getLoadedExtensions in class AbstractQuercusModule

mhash

public Value mhash(Env env,
                   int hash,
                   StringValue data,
                   java.lang.String key)

mhash_count

public int mhash_count()
Returns the highest available hash id.


mhash_get_block_size

public Value mhash_get_block_size(int hash)

mhash_get_hash_name

public Value mhash_get_hash_name(Env env,
                                 int hash)