[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/ -> Twofish.php (summary)

Pure-PHP implementation of Twofish. Uses mcrypt, if available, and an internal implementation, otherwise.

Author: Jim Wigginton
Author: Hans-Juergen Petrich
Copyright: 2007 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 816 lines (38 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Twofish:: (6 methods):
  setKeyLength()
  _setupKey()
  _mdsrem()
  _encryptBlock()
  _decryptBlock()
  _setupInlineCrypt()


Class: Twofish  - X-Ref

Pure-PHP implementation of Twofish.

setKeyLength($length)   X-Ref
Sets the key length.

Valid key lengths are 128, 192 or 256 bits

param: int $length

_setupKey()   X-Ref
Setup the key (expansion)

see: \phpseclib\Crypt\Base::_setupKey()

_mdsrem($A, $B)   X-Ref
_mdsrem function using by the twofish cipher algorithm

return: array
param: string $A
param: string $B

_encryptBlock($in)   X-Ref
Encrypts a block

return: string
param: string $in

_decryptBlock($in)   X-Ref
Decrypts a block

return: string
param: string $in

_setupInlineCrypt()   X-Ref
Setup the performance-optimized function for de/encrypt()

see: \phpseclib\Crypt\Base::_setupInlineCrypt()