[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/phpseclib/phpseclib/phpseclib/Crypt/ -> RC4.php (summary)

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

Author: Jim Wigginton <[email protected]>
Copyright: 2007 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
File Size: 309 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RC4:: (9 methods):
  isValidEngineHelper()
  setKeyLength()
  setKey()
  encrypt()
  decrypt()
  encryptBlock()
  decryptBlock()
  setupKey()
  crypt()


Class: RC4  - X-Ref

Pure-PHP implementation of RC4.

isValidEngineHelper($engine)   X-Ref
Test for engine validity

This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()

param: int $engine
return: bool

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

Keys can be between 1 and 256 bytes long.

param: int $length

setKey($key)   X-Ref
Sets the key length

Keys can be between 1 and 256 bytes long.

param: string $key

encrypt($plaintext)   X-Ref
Encrypts a message.

param: string $plaintext
return: string $ciphertext

decrypt($ciphertext)   X-Ref
Decrypts a message.

$this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)).
At least if the continuous buffer is disabled.

param: string $ciphertext
return: string $plaintext

encryptBlock($in)   X-Ref
Encrypts a block

param: string $in

decryptBlock($in)   X-Ref
Decrypts a block

param: string $in

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


crypt($text, $mode)   X-Ref
Encrypts or decrypts a message.

param: string $text
param: int $mode
return: string $text



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer