You are here

function encrypt_encrypt_method_info in Encrypt 7

Same name and namespace in other branches
  1. 6 includes/encrypt.encrypt.inc \encrypt_encrypt_method_info()

Implementation of hook_encrypt_method_info().

File

includes/encrypt.encrypt.inc, line 13
This file holds the hook implementation for the encrypt modules

Code

function encrypt_encrypt_method_info() {
  $methods = array();
  $default_method = (string) ENCRYPT_DEFAULT_METHOD;

  // Basic methods that dont need any extensions
  $methods[$default_method] = array(
    'title' => t('Basic'),
    'description' => t('This is the basic default encryption type that does not require any special extensions.'),
    'callback' => 'encrypt_encrypt_basic',
  );
  $methods['none'] = array(
    'title' => t('None'),
    'description' => t('This uses no encryption.  It is not suggested to use this.'),
    'callback' => 'encrypt_encrypt_none',
  );

  // Mcrypt method
  if (function_exists('mcrypt_get_iv_size') && function_exists('mcrypt_create_iv') && function_exists('mcrypt_encrypt')) {
    $methods['mcrypt_rij_256'] = array(
      'title' => t('Mcrypt AES 256'),
      'description' => t('This uses PHPs mcrypt extension and <a href="!url">AES-256</a>.', array(
        '!url' => 'http://en.wikipedia.org/wiki/Advanced_Encryption_Standard',
      )),
      'callback' => 'encrypt_encrypt_mcrypt_rij_256',
    );
  }
  return $methods;
}