Support

Account

Home Forums General Issues Decrypt an encrypted field in DB before showing actual field (in post)

Helping

Decrypt an encrypted field in DB before showing actual field (in post)

  • I am storing sensitive data in a CPT using ACF fields. Each sensitive field is encrypted upon form submission before inserting to the DB – text converted to something like ‘M3QxKzRXN1FaVlg3alZaUDlNbHdOdXVuSnZQNUF5U29XVWpVKzNPSGFFRT0’

    I can decrypt that to show on the front end, but that is not what I want to achieve.

    I want the fields in the WP backend to decrypt the field data before outputting it in the post editor, so that the admin can see actual data.

    E.g. instead of

    Name: jsdfhJHjhdfsjhgdsf
    Address: yutsefdSADfuy23eufj&A

    I want the admin to see (this will never be accessible on the frontend – backend only):

    Name: John Doe
    Address: 123 California Road

    Any help is much appreciated.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.