| Moodle PHP Documentation 4.1
    Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc) | 
| Functions | |
| __construct ($cipher) | |
| Constructor. | |
| __construct ($key, array $opts=array()) | |
| Constructor. | |
| __construct ($pass, $key_length, array $opts=array()) | |
| Constructor. | |
| __get ($name) | |
| __toString () | |
| _binxor ($l, $r) | |
| Workaround for XOR on certain systems. | |
| _decipher (&$Xl, &$Xr) | |
| Deciphers a single 64-bit block. | |
| _encipher (&$Xl, &$Xr) | |
| Enciphers a single 64-bit block. | |
| _pad ($text, $ignore=false) | |
| Pad text to match blocksize length. | |
| _unpad ($text) | |
| Unpad text from blocksize boundary. | |
| decrypt ($text) | |
| Decrypts a string. | |
| decrypt ($text, $iv) | |
| encrypt ($text) | |
| Encrypts a string. | |
| encrypt ($text, $iv) | |
| setIv ($iv=null) | |
| Sets the initialization vector (required for CBC mode). | |
| setKey ($key, $iv=null) | |
| Sets the secret key. | |
| static | supported () | 
| Is this driver supported on this system? | |
| Variables | |
| Horde_Crypt_Blowfish_Base | $_crypt | 
| Blowfish crypt driver. | |
| string | $_key | 
| The derived key. | |
| array | $_P | 
| P-Array contains 18 32-bit subkeys. | |
| array | $_S | 
| Array of four S-Blocks each containing 256 32-bit entries. | |
| return in_array('bf-ecb', $ciphers) &&in_array('bf-cbc' | $ciphers | 
| integer | $iterations | 
| Number of iterations to use. | |
| string | $iv = null | 
| Initialization vector. | |
| string | $key | 
| Encryption key. | |
| string | $salt | 
| Salt. | |
| const | BLOCKSIZE = 8 | 
| return | false | 
| **See the enclosed file LICENSE for license information(LGPL). If you *did not receive this file see | http | 
| *See the enclosed file LICENSE for license information(LGPL). If you *did not receive this file see | http | 
| *See the enclosed file LICENSE for license information(LGPL). If you *did not receive this file see | http | 
| *See the enclosed file LICENSE for license information(LGPL). If you *did not receive this file see | http | 
| **See the enclosed file LICENSE for license information(LGPL). If you *did not receive this file see | http | 
| const | IGNORE_MCRYPT = 2 | 
| const | IV_LENGTH = 8 | 
| const | MAXKEYSIZE = 56 | 
| __construct | ( | $key | ) | 
Constructor.
| string | $cipher | Either 'ecb' or 'cbc'. | 
| string | $key | Encrpytion key. | 
| __construct | ( | $key, | |
| array | $opts = array() ) | 
Constructor.
| string | $key | Encryption key. | 
| array | $opts | Additional options: 
 | 
| __construct | ( | $pass, | |
| $key_length, | |||
| array | $opts = array() ) | 
Constructor.
| string | $pass | The password. | 
| string | $key_length | Length of the derived key (in bytes). | 
| array | $opts | Additional options: 
 | 
| 
 | protected | 
Workaround for XOR on certain systems.
| integer | float | $l | |
| integer | float | $r | 
| float | 
| 
 | protected | 
Deciphers a single 64-bit block.
| int | &$Xl | |
| int | &$Xr | 
| 
 | protected | 
Enciphers a single 64-bit block.
| int | &$Xl | |
| int | &$Xr | 
| 
 | protected | 
Pad text to match blocksize length.
| string | $text | Unpadded text. | 
| boolean | $ignore | Don't pad if already at blocksize length. | 
| string | Padded text. | 
| 
 | protected | 
Unpad text from blocksize boundary.
| string | $text | Padded text. | 
| string | Unpadded text. | 
| 
 | abstract | 
Decrypts a string.
| string | $text | The string to decrypt. | 
| string | The plaintext. | 
| Horde_Crypt_Blowfish_Exception | 
| string | $text | The string to encrypt. | 
| string | The ciphertext. | 
| Horde_Crypt_Blowfish_Exception | 
| 
 | abstract | 
Encrypts a string.
| string | $text | The string to encrypt. | 
| string | The ciphertext. | 
| Horde_Crypt_Blowfish_Exception | 
| setIv | ( | $iv = null | ) | 
Sets the initialization vector (required for CBC mode).
| string | $iv | Initialization vector. | 
| setKey | ( | $key, | |
| $iv = null ) | 
Sets the secret key.
The key must be non-zero, and less than or equal to MAXKEYSIZE characters (bytes) in length.
| string | $key | Key must be non-empty and less than MAXKEYSIZE bytes in length. | 
| string | $iv | The initialization vector to use. Only needed for 'cbc' cipher. If null, an IV is automatically generated. | 
| Horde_Crypt_Blowfish_Exception | 
| 
 | static | 
Is this driver supported on this system?
| boolean | True if supported. | 
| 
 | protected |