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_AES

Class Crypt_AES

Pure-PHP implementation of AES.

Crypt_Rijndael
Extended by Crypt_AES
Package: Crypt\AES
Copyright: MMVIII Jim Wigginton
License: MIT License
Author: Jim Wigginton <terrafrost@php.net>
Version: 0.1.0
Located at vendors/phpseclib/Crypt/AES.php

Methods summary

public Crypt_AES
# Crypt_AES( optional $mode = CRYPT_AES_MODE_CBC )

Default Constructor.

Default Constructor.

Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC. If not explictly set, CRYPT_AES_MODE_CBC will be used.

Parameters

$mode
optional
Integer $mode

Returns

Crypt_AES
public
# setBlockLength( Integer $length )

Dummy function

Dummy function

Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything.

Parameters

$length
Integer
$length

Overrides

Crypt_Rijndael::setBlockLength
public
# setIV( String $iv )

Sets the initialization vector. (optional)

Sets the initialization vector. (optional)

SetIV is not required when CRYPT_RIJNDAEL_MODE_ECB is being used. If not explictly set, it'll be assumed to be all zero's.

Parameters

$iv
String
$iv

Overrides

Crypt_Rijndael::setIV
public
# encrypt( String $plaintext )

Encrypts a message.

Encrypts a message.

$plaintext will be padded with up to 16 additional bytes. Other AES implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:

http://www.di-mgt.com.au/cryptopad.html

An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of 16, however, arbitrary values can be added to make it that length.

Parameters

$plaintext
String
$plaintext

See

Crypt_AES::decrypt()

Overrides

Crypt_Rijndael::encrypt
public
# decrypt( String $ciphertext )

Decrypts a message.

Decrypts a message.

If strlen($ciphertext) is not a multiple of 16, null bytes will be added to the end of the string until it is.

Parameters

$ciphertext
String
$ciphertext

See

Crypt_AES::encrypt()

Overrides

Crypt_Rijndael::decrypt
public
# _mcryptSetup( )

Setup mcrypt

Setup mcrypt

Validates all the variables.

public String
# _encryptBlock( String $in )

Encrypts a block

Encrypts a block

Optimized over Crypt_Rijndael's implementation by means of loop unrolling.

Parameters

$in
String
$in

Returns

String

See

Crypt_Rijndael::_encryptBlock()

Overrides

Crypt_Rijndael::_encryptBlock
public String
# _decryptBlock( String $in )

Decrypts a block

Decrypts a block

Optimized over Crypt_Rijndael's implementation by means of loop unrolling.

Parameters

$in
String
$in

Returns

String

See

Crypt_Rijndael::_decryptBlock()

Overrides

Crypt_Rijndael::_decryptBlock

Methods inherited from Crypt_Rijndael

Crypt_Rijndael(), _generate_xor(), _invSubWord(), _pad(), _setup(), _string_shift(), _subWord(), _unpad(), disableContinuousBuffer(), disablePadding(), enableContinuousBuffer(), enablePadding(), setKey(), setKeyLength(), setPassword()

Magic methods summary

Properties summary

public String $enmcrypt
#

mcrypt resource for encryption

mcrypt resource for encryption

The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.

See

Crypt_AES::encrypt()
public String $demcrypt
#

mcrypt resource for decryption

mcrypt resource for decryption

The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.

See

Crypt_AES::decrypt()
public String $ecb
#

mcrypt resource for CFB mode

mcrypt resource for CFB mode

See

Crypt_AES::encrypt()
Crypt_AES::decrypt()

Properties inherited from Crypt_Rijndael

$Nb, $Nk, $Nr, $block_size, $c, $changed, $continuousBuffer, $debuffer, $decryptIV, $dt0, $dt1, $dt2, $dt3, $dw, $enbuffer, $encryptIV, $explicit_key_length, $iv, $key, $key_size, $mode, $paddable, $padding, $t0, $t1, $t2, $t3, $w

Blesta API documentation generated by ApiGen 2.8.0