function crypt_blowfish_admin in Web Service Clients 7
Same name and namespace in other branches
- 6.2 connections/clients_drupal/crypt_blowfish/crypt_blowfish.module \crypt_blowfish_admin()
- 6 backends/clients_drupal/crypt_blowfish/crypt_blowfish.module \crypt_blowfish_admin()
- 7.3 connections/clients_drupal/crypt_blowfish/crypt_blowfish.module \crypt_blowfish_admin()
- 7.2 connections/clients_drupal/crypt_blowfish/crypt_blowfish.module \crypt_blowfish_admin()
Return value
array Form
1 string reference to 'crypt_blowfish_admin'
- crypt_blowfish_menu in backends/
clients_drupal/ crypt_blowfish/ crypt_blowfish.module - Implementation of hook_menu()
File
- backends/
clients_drupal/ crypt_blowfish/ crypt_blowfish.module, line 58 - PEAR Crypt_Blowfish integration
Code
function crypt_blowfish_admin() {
$form = array();
if (Drupal_Crypt_Blowfish::getkey() == 'replace this with a strong password') {
$keyinfo = t('<strong>You still need to set this key. Go to this module\'s install directory and change the file \'crypt_blowfish_key.inc\'</strong>');
}
else {
$keyinfo = t('The key is set to: <em>' . Crypt_Blowfish::getkey() . '</em>');
}
$form['crypt_info'] = array(
'#value' => t("<p>Remote login passwords are stored using reversible encryption. This means that they should be reasonably safe in case anybody has access to your database if you choose a strong key. This key is stored in plaintext in the file 'crypt_blowfish.key' in this module's install directory and can include any characters.</p><p>!keyinfo</p><p>The PEAR <a href=\"http://pear.php.net/package/Crypt_Blowfish\">Crypt_Blowfish</a> package must be installed for this module to work (see <a href=\"http://pear.php.net/manual/en/guide.users.commandline.installing.php\">installing packages</a>). If you do not have permission to install PEAR packages, you can download this to a local directory.</p>", array(
'!keyinfo' => $keyinfo,
)),
);
$form['crypt_blowfish_cryptdir'] = array(
'#type' => 'textfield',
'#title' => t('PEAR Crypt directory'),
'#default_value' => variable_get('crypt_blowfish_cryptdir', ''),
'#size' => 75,
'#maxlength' => 400,
'#description' => t('Usually your PEAR path. Must be full system path with leading slash'),
'#required' => TRUE,
);
return system_settings_form($form);
}