Here is an example of using this module for CCK Fields
This is for hook_nodeapi

	  case 'presave':
		//ENCRYPT	  
		if ($node->type == "accounts")
			{
			$node->field_myfield[0]["value"]  = aes_encrypt($node->field_myfield[0]["value"]);		
			}			
	  case 'load':
		//DECRYPT
		if ($node->type == "accounts")
			{
			$node->field_myfield[0]["value"]  = aes_decrypt($node->field_myfield[0]["value"]);		
			}		
		break;

Comments

giorgio79’s picture

Status: Active » Closed (fixed)
techypaul’s picture

Not being a php programmer - do I create a custom module and stick this in? do you have a premade custom module for this? right now I only need this on one cck field so I could use your example to make it work for me quite easily I think?

Thanks,
Paul.