An encrypted Flexicontent field

More
10 years 5 months ago #41646 by wiebe
Hi there,

I like some input on if the approach I am planning to follow would lead to an acceptable result.

I want to create a Flexicontent field type to enable me to store (minor sensitive) data with at least some security.
I am well aware of all the security implications... this is going to run in a secure environment only (SSL) and I do not want to get into a discussion about security issues in general.

My approach would be to create a new Flexicontent_fields plugin (Encoded), which I will add to the jos_extensions table and the processLanguageFiles function.

I would then implement the encoding inside the onBeforeSaveField function of the plugin - using mcrypt_encrypt and base64_encode to allow storing of the value without having to modify the database structure.

The decrypting would be implemented inside the onDisplayFieldValue function.

All together this sounds pretty straightforward to me, but maybe there is something I have missed.

Would this work?

Hope to hear.

cheers,

Wiebe

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #41652 by ggppdk
Hello

you don't need to modify any DB tables, just zip your files
myfieldtype.php
myfieldtype.xml
and then install via Joomla extension manager and then publish them via Joomla plugin manager

- for the rest, yes the way to do it is using the event that you describe (onBeforeSaveField), just to make it easier to duplicate an existing field, may be choose a field with easy name for replacing?

e.g. if you choose 'weblink' field then the search and replace (case sensitive for: weblink, Weblink) will be easy,

if you choose field 'text' then search and replace will find words that should not be replaced

I guess you have seen this FAQ article:
How to Duplicate a Flexicontent Field to create a new Field Type


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.268 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline