https://mamchenkov.net/wordpress/2016/04/18/working-with-encrypted-values-in-sugarcrm-6-5/
Working with encrypted values in SugarCRM 6.5