Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Crypt_Hash

Class Crypt_Hash

Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.

Package: Crypt\Hash
Copyright: MMVII Jim Wigginton
License: MIT License
Author: Jim Wigginton <terrafrost@php.net>
Version: 0.1.0
Located at vendors/phpseclib/Crypt/Hash.php

Methods summary

public Crypt_Hash
# Crypt_Hash( optional $hash = 'sha1' )

Default Constructor.

Default Constructor.

Parameters

$hash
optional
String $hash

Returns

Crypt_Hash
public
# setKey( String $key )

Sets the key for HMACs

Sets the key for HMACs

Keys can be of any length.

Parameters

$key
String
$key
public
# setHash( String $hash )

Sets the hash function.

Sets the hash function.

Parameters

$hash
String
$hash
public String
# hash( String $text )

Compute the HMAC.

Compute the HMAC.

Parameters

$text
String
$text

Returns

String
public Integer
# getLength( )

Returns the hash length (in bytes)

Returns the hash length (in bytes)

Returns

Integer
public
# _md5( String $m )

Wrapper for MD5

Wrapper for MD5

Parameters

$m
String
$text
public
# _sha1( String $m )

Wrapper for SHA1

Wrapper for SHA1

Parameters

$m
String
$text
public
# _md2( String $m )

Pure-PHP implementation of MD2

Pure-PHP implementation of MD2

See RFC1319.

Parameters

$m
String
$text
public
# _sha256( String $m )

Pure-PHP implementation of SHA256

Pure-PHP implementation of SHA256

See SHA-256 (a SHA-2 variant) pseudocode - Wikipedia.

Parameters

$m
String
$text
public
# _sha512( String $m )

Pure-PHP implementation of SHA384 and SHA512

Pure-PHP implementation of SHA384 and SHA512

Parameters

$m
String
$text
public Integer
# _rightRotate( Integer $int, Integer $amt )

Right Rotate

Right Rotate

Parameters

$int
Integer
$int
$amt
Integer
$amt

Returns

Integer

See

Crypt_Hash::_sha256()
public Integer
# _rightShift( Integer $int, Integer $amt )

Right Shift

Right Shift

Parameters

$int
Integer
$int
$amt
Integer
$amt

Returns

Integer

See

Crypt_Hash::_sha256()
public Integer
# _not( Integer $int )

Not

Not

Parameters

$int
Integer
$int

Returns

Integer

See

Crypt_Hash::_sha256()
public String
# _add( )

Add

Add

_sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the possibility of overflow exists, care has to be taken. Math_BigInteger() could be used but this should be faster.

Returns

String

See

Crypt_Hash::_sha256()
public String
# _string_shift( String & $string, optional $index = 1 )

String Shift

String Shift

Inspired by array_shift

Parameters

$string
String
$string
$index
optional
Integer $index

Returns

String

Magic methods summary

Properties summary

public Integer $b
#

Byte-length of compression blocks / key (Internal HMAC)

Byte-length of compression blocks / key (Internal HMAC)

See

Crypt_Hash::setAlgorithm()
public Integer $l
#

Byte-length of hash output (Internal HMAC)

Byte-length of hash output (Internal HMAC)

See

Crypt_Hash::setHash()
public String $hash
#

Hash Algorithm

Hash Algorithm

See

Crypt_Hash::setHash()
public String $key
#

Key

Key

See

Crypt_Hash::setKey()
public String $opad
#

Outer XOR (Internal HMAC)

Outer XOR (Internal HMAC)

See

Crypt_Hash::setKey()
public String $ipad
#

Inner XOR (Internal HMAC)

Inner XOR (Internal HMAC)

See

Crypt_Hash::setKey()
Blesta API documentation generated by ApiGen 2.8.0