Title: difference between encryption function and Gravity Field encryptions
Last modified: August 30, 2016

---

# difference between encryption function and Gravity Field encryptions

 *  [muhammadn](https://wordpress.org/support/users/muhammadn/)
 * (@muhammadn)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/difference-between-encryption-function-and-gravity-field-encryptions/)
 * Hi,
 * I have used your awesome plugin to work with Gravity Forms, everything works 
   fine, thanks !
 * except for one thing,
    I need to set a search criteria for `GFAPI::get_entries`
   and unfortunately your plugin doesnot work here,
 * I mean this doesn’t return anything:
 *     ```
       $search_criteria["field_filters"][] = array( 'key' => "6", 'value' => encrypt_this($current_user->user_email) );
       ```
   
 * here is `encrypt_this` :
 *     ```
       function encrypt_this($value_to_encrypt){
           $encrypted_value = $value_to_encrypt;
           if(class_exists('GDS_Encryption_Class'))
           {
               $encrypted_value = GDS_Encryption_Class::encrypt($value_to_encrypt);
           }
           return $encrypted_value;
       }
       ```
   
 * while of course this work:
 *     ```
       $search_criteria["field_filters"][] = array( 'key' => "6", 'value' => 'enx2:loesFFld0WeJP/g2y+/UHAA9nObVFIyPV5oglm6aCbTHZt0zgoYP4s7NVy731gJTpZBVLnywI0W9q79HAHENho' );
       ```
   
 * the value “enx2:…” is copied directly from the database
    is there something I’m
   missing ?! Thanks in advance
 * [https://wordpress.org/plugins/gravitate-encryption/](https://wordpress.org/plugins/gravitate-encryption/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Gravitate](https://wordpress.org/support/users/gravitate/)
 * (@gravitate)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/difference-between-encryption-function-and-gravity-field-encryptions/#post-6254990)
 * Yeah,
    Unfortunately since the data is all encrypted the search does not work.
 * I like where you are going with the filtering on the search parameters.
    Can 
   you confirm that your “encrypt_this” function is returning the correct value.
   It might be possible that your function is running before GDS_Encryption_Class
   has been defined.

Viewing 1 replies (of 1 total)

The topic ‘difference between encryption function and Gravity Field encryptions’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravitate-encryption_414244.svg)
 * [Gravitate Encryption](https://wordpress.org/plugins/gravitate-encryption/)
 * [Support Threads](https://wordpress.org/support/plugin/gravitate-encryption/)
 * [Active Topics](https://wordpress.org/support/plugin/gravitate-encryption/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravitate-encryption/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravitate-encryption/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gravitate](https://wordpress.org/support/users/gravitate/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/difference-between-encryption-function-and-gravity-field-encryptions/#post-6254990)
 * Status: not resolved