public class HashModule extends AbstractQuercusModule
MessageDigest
class to calculate
digests. Typical java installations support MD2, MD5, SHA1, SHA256, SHA384,
and SHA512.Modifier and Type | Class and Description |
---|---|
static class |
HashModule.HashContext |
static class |
HashModule.HashDigestContext |
static class |
HashModule.HashMacContext |
Modifier and Type | Field and Description |
---|---|
static int |
HASH_HMAC |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
HashModule() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLoadedExtensions()
Returns the extensions loaded by the module.
|
static Value |
hash_algos(Env env)
Returns the list of known algorithms
|
HashModule.HashContext |
hash_copy(HashModule.HashContext context)
Copies a hash instance
|
Value |
hash_file(Env env,
java.lang.String algorithm,
Path path,
boolean isBinary)
Hashes a file
|
Value |
hash_final(Env env,
HashModule.HashContext context,
boolean isBinary)
Returns the final hash value
|
Value |
hash_hmac_file(Env env,
java.lang.String algorithm,
Path path,
StringValue key,
boolean isBinary)
Hashes a file with the algorithm.
|
Value |
hash_hmac(Env env,
java.lang.String algorithm,
StringValue data,
StringValue key,
boolean isBinary)
Hashes a string with the algorithm.
|
HashModule.HashContext |
hash_init(Env env,
java.lang.String algorithm,
int options,
StringValue keyString)
Initialize a hash context.
|
Value |
hash_update_file(Env env,
HashModule.HashContext context,
Path path)
Updates the hash with more data
|
int |
hash_update_stream(Env env,
HashModule.HashContext context,
java.io.InputStream is,
int length)
Updates the hash with more data
|
Value |
hash_update(Env env,
HashModule.HashContext context,
StringValue value)
Updates the hash with more data
|
Value |
hash(Env env,
java.lang.String algorithm,
StringValue string,
boolean isBinary)
Hashes a string
|
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
public static final int HASH_HMAC
public java.lang.String[] getLoadedExtensions()
AbstractQuercusModule
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public Value hash(Env env, java.lang.String algorithm, StringValue string, boolean isBinary)
public HashModule.HashContext hash_copy(HashModule.HashContext context)
public Value hash_file(Env env, java.lang.String algorithm, Path path, boolean isBinary)
public Value hash_final(Env env, HashModule.HashContext context, boolean isBinary)
public Value hash_hmac(Env env, java.lang.String algorithm, StringValue data, StringValue key, boolean isBinary)
public Value hash_hmac_file(Env env, java.lang.String algorithm, Path path, StringValue key, boolean isBinary)
public HashModule.HashContext hash_init(Env env, java.lang.String algorithm, int options, StringValue keyString)
public Value hash_update(Env env, HashModule.HashContext context, StringValue value)
public Value hash_update_file(Env env, HashModule.HashContext context, Path path)
public int hash_update_stream(Env env, HashModule.HashContext context, java.io.InputStream is, int length)