Source for file pcf_md5.phpinc

Documentation is available at pcf_md5.phpinc

  1. <?php
  2. /**
  3.   * Common MD5 Functions
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    common
  7.   * @category   security
  8.   *
  9.   * @author     Alexander Valyalkin (from http://at.php.net/manual/en/function.md5.php)
  10.   * @author     Peter Krebs <p.krebs@lvus.at>
  11.   *
  12.   * @deprecated moved to OCSP_SESSION
  13.   */
  14.  
  15. if (!class_exists('OCSP_SESSION'))
  16. {
  17.     require_once __OCSP_PHPINCPATH__."common/OCSP_SESSION.phpclass";
  18. }  
  19.  
  20. /**
  21.   * md5 encrypts a text
  22.   *
  23.   * if $password is empty $_SESSION['MD5PWD'] is used
  24.   *
  25.   * @param string $plain_text 
  26.   * @param string $password 
  27.   * @param int $iv_len 
  28.   *
  29.   * @returns string
  30.   *
  31.   * @version pk-04-12-29
  32.   * @version pk-06-07-23
  33.   *
  34.   * @deprecated since pk-08-03-14
  35.   */
  36. function pcfmd5_encrypt($plain_text$password=""$iv_len 16{
  37.     return OCSP_SESSION::getInstance(true)->encrypt($plain_text,$password,$iv_len);
  38. }
  39.  
  40. /**
  41.   * md5 decrypts a text
  42.   *
  43.   * if $password is empty $_SESSION['MD5PWD'] is used
  44.   *
  45.   * @param string $enc_text 
  46.   * @param string $password 
  47.   * @param int $iv_len 
  48.   *
  49.   * @returns string
  50.   *
  51.   * @version pk-04-12-29
  52.   * @version pk-06-07-23
  53.   *
  54.   * @deprecated since pk-08-03-14
  55.   */
  56. function pcfmd5_decrypt($enc_text,$password="",$iv_len 16
  57. {
  58.     return OCSP_SESSION::getInstance(true)->decrypt($enc_text,$password,$iv_len);
  59. }
  60. ?>

Documentation generated on Thu, 08 Jan 2009 17:47:47 +0100 by phpDocumentor 1.4.0a2