Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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