You are here

real_aes.module in Real AES 7

Same filename and directory in other branches
  1. 7.2 real_aes.module

Library loader for the Defuse PHP-encryption library.

File

real_aes.module
View source
<?php

/**
 * @file
 * Library loader for the Defuse PHP-encryption library.
 */

/**
 * Implements hook_libraries_info().
 */
function real_aes_libraries_info() {
  return array(
    'php-encryption' => array(
      'name' => t('Defuse PHP-encryption'),
      'vendor_url' => 'https://github.com/defuse/php-encryption',
      'download_url' => 'https://github.com/defuse/php-encryption/archive/master.zip',
      'files' => array(
        'php' => array(
          'autoload.php',
        ),
      ),
      'version' => 'master',
    ),
  );
}

/**
 * Load the defuse php encryption library.
 *
 * @return bool
 *   TRUE if the library could be loaded, FALSE otherwise.
 */
function real_aes_load_library() {
  $library = libraries_load('php-encryption');
  return !empty($library['loaded']);
}

/**
 * Implements hook_ctools_plugin_directory().
 */
function real_aes_ctools_plugin_directory($module, $plugin) {
  if ($module == 'encrypt') {
    return 'plugins/' . $plugin;
  }
}

Functions

Namesort descending Description
real_aes_ctools_plugin_directory Implements hook_ctools_plugin_directory().
real_aes_libraries_info Implements hook_libraries_info().
real_aes_load_library Load the defuse php encryption library.