xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • base16
  • base16uppercase
  • base64
  • base64s
  • boolean
  • charset
  • clear
  • crc32
  • decimal
  • delegate
  • escape
  • escapestring
  • hash
  • html
  • integer
  • md5
  • md5sum
  • passthrough
  • qp
  • rawurl
  • serialize
  • sha
  • sha1
  • sha1sum
  • smd5
  • split
  • ssha
  • taggedhash
  • url
  • uu
  • xml

Class hash

Calculates a hash of any input data using a specified method.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Set\Mutable implements Core\Mutator
Extended by Core\Field implements Core\Inquiry
Extended by Core\Encoder
Extended by Core\Encoder\Driver\hash
Namespace: Core\Encoder\Driver
Package: Core\Encoder
Since: 3.0
Requires: PHP 5.3, PHP Message Digest Framework extension 1.1
Version: 1.0
Located at Encoder/Driver/hash.inc.php

Methods summary

public
# __construct( Core\URI $uri )

Initialises new encoder instance and automatically initialises and chains a successor encoder if specified by URI. Additionally extracts hashing algorithm from URI path and additional hashing parameters.

Initialises new encoder instance and automatically initialises and chains a successor encoder if specified by URI. Additionally extracts hashing algorithm from URI path and additional hashing parameters.

Parameters

$uri
Reference to describing URI instance from factory.

Since

3.0

Overrides

Core\Encoder::__construct
public Core\URI
# decoderURI( )

Hashes cannot be decoded.

Hashes cannot be decoded.

Returns

Core\URI
Yields null.

Since

3.0

Overrides

Core\Encoder::decoderURI
public string
# finalize( boolean $binary = null )

Finalises hash calculation and returns the most recent hash.

Finalises hash calculation and returns the most recent hash.

Parameters

$binary
Overwrites the $binary mode for the returned hash if not null.

Returns

string
Generated hash.

Since

3.0
public boolean
# reversible( )

Hashes are not reversible.

Hashes are not reversible.

Returns

boolean
Yields false.

Since

3.0

Overrides

Core\Encoder::reversible
public Core\Encoder\Driver\hash
# update( string $data )

Updates the hash with additional data.

Updates the hash with additional data.

Parameters

$data
Data to update hash with.

Returns

Core\Encoder\Driver\hash
Reference to this encoder instance.

Since

3.0
public Core\Encoder\Driver\hash
# updateFromStream( Core\Stream $stream, $length = -1 )

Updates the hash with additional data read from a stream.

Updates the hash with additional data read from a stream.

Parameters

$stream
Stream to read data from.
$length

of bytes to read from stream. If < 0, the remaining bytes of the stream are read.

Returns

Core\Encoder\Driver\hash
Reference to this encoder instance.

Since

3.0
protected string
# _encode( string $data )

Encoder stub used by drivers to implement specific encodings.

Encoder stub used by drivers to implement specific encodings.

Parameters

$data
Data to encode.

Returns

string
Encoded data.

Since

3.0

Methods inherited from Core\Encoder

__invoke(), autocreate(), chain(), decoderChainURI(), encode(), encoderChainURI(), getDataForUndefinedKey(), resolveDecoder(), resolveDecoderChain(), verify()

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), issetDataForKey(), offsetExists(), offsetGet(), offsetSet(), offsetUnset()

Methods inherited from Core\Set\Mutable

__set(), __unset()

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

string BinaryParameter

Flag to indicate whether a raw binary hash should be generated or otherwise a lowercase hexadecimal hash is returned. Defaults to true.

Flag to indicate whether a raw binary hash should be generated or otherwise a lowercase hexadecimal hash is returned. Defaults to true.

Since

3.0
# 'binary'
string KeyParameter

Shared key used by the selected hashing algorithm.

Shared key used by the selected hashing algorithm.

Since

3.0
# 'key'

Constants inherited from Core\Encoder

SuccessorParameter

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected string $_v_algorithm

KVC property.

KVC property.

Since

3.0
#
protected resource $_context

Hashing context.

Hashing context.

Since

3.0
#

Properties inherited from Core\Encoder

$_v_parameters, $_v_successor, $_v_uri

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only string $algorithm

Name of hashing algorithm extracted from URI path during initialisation.

Magic properties inherited from Core\Encoder

$dataSource, $parameters, $successor, $uri

Magic properties inherited from Core\Field

$data

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen