To protect sensitive data - such as HIPAA info
You should be able to use the functions in:
to do symmetric encryption/decryption of the fields. Password related fields in the CiviCRM db are encrypted. As Lesley mentions, there are two aspects to this problem. Encrypting data, and restricting access to the data to a certain class of users
Do you want just one field encrypted or a group of fields (if you're dealing w/HIPAA data, probably it is more than one, right?) Create custom fields where the 'Type' is, say, 'HIPAA' (you can create this subtype by subtyping your basic object, whether it is Activities, Campaigns, or Contacts). From there, you'd need to add a hook/code to encrypt fields where the Type == HIPAA.. You'd need to also determine which user type(s) (Admin?) should be able to see unencrypted values and handle that.
We were recently asked to 'Encrypt one CiviCRM custom field' for one of our clients who uses Webform CiviCRM module as a GUI to view/edit/add custom field values to CiviCRM for their clients.
I ended up leveraging Drupal Encrypt module to not just encrypt the values stored on the Drupal side (in the Webform Submission) but also to encrypt the values stored on the CiviCRM side.
Using Webform CiviCRM module to handle view/edit/add custom field values means a variety of Drupal access permissions are available to control which user can see what.
If you think this may be useful, feel free to give it a try and let me know what you think. The code lives here -> https://github.com/KarinG/webform_deur_encrypt