I am currently storing five text fields in a table along with a number of numeric fields.
I've now find that that these five text fields need to be encrypted. If I encrypt each text field and then use base64encode
, do I need to store the result in a BLOB or a TEXT field?
At this time I have set up the table with five BLOB fields. When I update one of the fields I use the following code;
put base64encode(tValue) into t64EncValue
put "UPDATE myTable SET blobTextfield01 = :1 WHERE recID = :2" into tSQL
revExecuteSQL gDatabaseID, tSQL, "*bt64EncValue", gCurrentID
When I read back the data (execute another SQL read) I can see that t64EncValue
has some data but when I do a base64Decode
, tText01
is left blank.
put base64decode(t64EncValue) into tText01
I'm not sure if I have a problem with the way the data is saved, the way it's retrieved, or whether base64decode
has an issue...