diff --git a/modules/encryptfapi/encryptfapi.module b/modules/encryptfapi/encryptfapi.module
index 682a075..3a06ff4 100644
--- a/modules/encryptfapi/encryptfapi.module
+++ b/modules/encryptfapi/encryptfapi.module
@@ -38,12 +38,11 @@ function _encryptfapi_form_submit($form, &$form_state) {
     if (is_array($instructions)) {
       $method = isset($instructions['method']) ? $instructions['method'] : NULL;
       $provider = isset($instructions['key_provider']) ? $instructions['key_provider'] : NULL;
-      $encrypted = encrypt($value, array(), $method, $provider);
+      $encrypted = encrypt($value, array('base64' => TRUE), $method, $provider);
     }
     else {
-      $encrypted = encrypt($value);
+      $encrypted = encrypt($value, array('base64' => TRUE));
     }
-
     form_set_value(array('#parents' => $tree), $encrypted, $form_state);
   }
 }
@@ -132,8 +131,8 @@ function _encryptfapi_get_accepted_element_types() {
 function _encryptfapi_element_prerender($element) {
   if (isset($element['#encrypt']) && $element['#encrypt'] && isset($element['#default_value'])) {
     // TODO: Support for specified enc. method and key provider.
-    $element['#default_value'] = decrypt($element['#default_value']);
-    $element['#value'] = decrypt($element['#value']);
+    $element['#default_value'] = decrypt($element['#default_value'], array('base64' => TRUE));
+    $element['#value'] = decrypt($element['#value'], array('base64' => TRUE));
   }
   return $element;
 }
diff --git a/modules/encryptfapi/encryptfapi.test b/modules/encryptfapi/encryptfapi.test
index 16206d0..9301941 100644
--- a/modules/encryptfapi/encryptfapi.test
+++ b/modules/encryptfapi/encryptfapi.test
@@ -42,14 +42,14 @@ class EncryptFAPITest extends DrupalWebTestCase {
     $this->assertFieldByName('encryptfapi_textfield_simple', $data['encryptfapi_textfield_simple'], t('Simple: The value appears unencrypted in the textfield.'));
     $encrypted_value = variable_get('encryptfapi_textfield_simple', 'A Test Value');
     $this->assertNotEqual($data['encryptfapi_textfield_simple'], $encrypted_value['text'], t('Simple: The value stored does not equal the value shown.'));
-    $this->assertEqual($data['encryptfapi_textfield_simple'], decrypt($encrypted_value), t('Simple: The stored value, when decrypted, equals the displayed/original value.'));
+    $this->assertEqual($data['encryptfapi_textfield_simple'], decrypt($encrypted_value, array('base64' => TRUE)), t('Simple: The stored value, when decrypted, equals the displayed/original value.'));
 
     // Then, the complex one.
     $this->assertFieldByName('encryptfapi_textfield_complex', $data['encryptfapi_textfield_complex'], t('Complex: The value appears unencrypted in the textfield.'));
     $encrypted_value = variable_get('encryptfapi_textfield_complex', 'A Test Value');
     $unserialized = unserialize($encrypted_value);
     $this->assertNotEqual($data['encryptfapi_textfield_complex'], $encrypted_value['text'], t('Complex: The value stored does not equal the value shown.'));
-    $this->assertEqual($data['encryptfapi_textfield_complex'], decrypt($encrypted_value), t('Complex: The stored value, when decrypted, equals the displayed/original value.'));
+    $this->assertEqual($data['encryptfapi_textfield_complex'], decrypt($encrypted_value, array('base64' => TRUE)), t('Complex: The stored value, when decrypted, equals the displayed/original value.'));
     $this->assertEqual('mcrypt_rij_256', $unserialized['method'], t('The correct encryption method was used.'));
 
     // Then, a nested one.
@@ -58,7 +58,7 @@ class EncryptFAPITest extends DrupalWebTestCase {
     $encrypted_value = variable_get('encrypt_tree', array());
     $unserialized = unserialize($encrypted_value['encryptfapi_textfield_nested']);
     $this->assertNotEqual($data['encrypt_tree[encryptfapi_textfield_nested]'], $unserialized['text'], t('Nested: The value stored does not equal the value shown.'));
-    $this->assertEqual($data['encrypt_tree[encryptfapi_textfield_nested]'], decrypt($encrypted_value['encryptfapi_textfield_nested']), t('Nested: The stored value, when decrypted, equals the displayed/original value.'));
+    $this->assertEqual($data['encrypt_tree[encryptfapi_textfield_nested]'], decrypt($encrypted_value['encryptfapi_textfield_nested'], array('base64' => TRUE)), t('Nested: The stored value, when decrypted, equals the displayed/original value.'));
   }
 
 }
