You are here

function _key_default_process_existing_key_value in Key 7.3

Default function to process an existing key value.

Parameters

array $plugin_config: The plugin configuration.

string $key_value: The value to be processed.

Return value

string The processed key value.

3 string references to '_key_default_process_existing_key_value'
generate.inc in plugins/key_input/generate.inc
textarea_field.inc in plugins/key_input/textarea_field.inc
text_field.inc in plugins/key_input/text_field.inc

File

./key.module, line 842
Main Key functionality and hook implementations.

Code

function _key_default_process_existing_key_value($plugin_config, $key_value) {

  // This is the default behavior. The key value is Base64-encoded if
  // it was originally submitted with Base64 encoding. Otherwise, it is
  // returned as-is.
  if (isset($plugin_config['base64_encoded']) && $plugin_config['base64_encoded'] == TRUE) {
    $processed_value = base64_encode($key_value);
  }
  else {
    $processed_value = $key_value;
  }
  return $processed_value;
}