Closed (fixed)
Project:
AES encryption
Version:
6.x-1.4
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2011 at 12:37 UTC
Updated:
2 May 2011 at 15:55 UTC
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
Comment #1
giorgio79 commentedComment #2
techypaul commentedNot 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.