Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Copyright 2005-2008 Matthew Fonda <mfonda@php.net> Copyright 2012-2017 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Author: Matthew Fonda <mfonda@php.net>
Author: Michael Slusarz <slusarz@horde.org>
License: http://www.horde.org/licenses/lgpl21 LGPL 2.1
File Size: 178 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Crypt_Blowfish:: (5 methods):
  __construct()
  __get()
  encrypt()
  decrypt()
  setKey()


Class: Horde_Crypt_Blowfish  - X-Ref

Provides blowfish encryption/decryption, with or without a secret key,
for PHP strings.

__construct($key, array $opts = array()   X-Ref
Constructor.

param: string $key  Encryption key.
param: array $opts  Additional options:

__get($name)   X-Ref
No description

encrypt($text)   X-Ref
Encrypts a string.

param: string $text  The string to encrypt.
return: string  The ciphertext.

decrypt($text)   X-Ref
Decrypts a string.

param: string $text  The string to decrypt.
return: string  The plaintext.

setKey($key, $iv = null)   X-Ref
Sets the secret key.

The key must be non-zero, and less than or equal to MAXKEYSIZE
characters (bytes) in length.

param: string $key  Key must be non-empty and less than MAXKEYSIZE
param: string $iv   The initialization vector to use. Only needed for