Does anyone know if its possible to encrypt and de-crpyt strings in FME. So if I needed to encrypt an email address to save it to a database and decrpyt it to send email out at a later date. Is that possible?
Thanks
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
I wanted to do the same thing (I am currently using FME desktop 2018.1.0.3) but have had nothing but problems with the AttributeCompressor / decompressor with AES-256 encryption and a good password.
It compresses it fine but then will not decompress it. the AttributeDecompressor just fails.
I wanted to do the same thing (I am currently using FME desktop 2018.1.0.3) but have had nothing but problems with the AttributeCompressor / decompressor with AES-256 encryption and a good password.
It compresses it fine but then will not decompress it. the AttributeDecompressor just fails.
This is very frustrating.
I haven't got enough details to know if this is the case here, but a common issue is that the AttributeCompressor does not return a string, but a binary value (which is shown as a string of hexadecimal values in the FME inspector).
If you write the binary value to e.g. a database string field and then read it back, the contents will probably not be the same anymore due to automatic conversion mechanisms in FME, leading the AttributeDecompressor to fail.
You should use the BinaryEncoder / BinaryDecoder to work around this issue.
I haven't got enough details to know if this is the case here, but a common issue is that the AttributeCompressor does not return a string, but a binary value (which is shown as a string of hexadecimal values in the FME inspector).
If you write the binary value to e.g. a database string field and then read it back, the contents will probably not be the same anymore due to automatic conversion mechanisms in FME, leading the AttributeDecompressor to fail.
You should use the BinaryEncoder / BinaryDecoder to work around this issue.
Hi David,
Thank you for the speedy reply. I had a look at the BinaryEncoder / BinaryDecoder however I am reluctant to use those as a pseudo encryption because they do not provide any security since they are so easy to reverse. Unless I am misunderstanding your suggestion and need to use the BinaryEncoder / BinaryDecoder in conjunction with the AttributeCompressor / decompressor.
My main use is to add very strong encryption to some database fields in a table that contains personal information, then decode it via FME as it is loaded into a cloud based asset management system.
I haven't got enough details to know if this is the case here, but a common issue is that the AttributeCompressor does not return a string, but a binary value (which is shown as a string of hexadecimal values in the FME inspector).
If you write the binary value to e.g. a database string field and then read it back, the contents will probably not be the same anymore due to automatic conversion mechanisms in FME, leading the AttributeDecompressor to fail.
You should use the BinaryEncoder / BinaryDecoder to work around this issue.
Thanks, learned something new today!
@mark2atsafe Adding the BinaryEncoder / BinaryDecoder part to the AttributeCompressor documentation might help others.
I wanted to do the same thing (I am currently using FME desktop 2018.1.0.3) but have had nothing but problems with the AttributeCompressor / decompressor with AES-256 encryption and a good password.
It compresses it fine but then will not decompress it. the AttributeDecompressor just fails.
This is very frustrating.
I've had a similar issue with writing encrypted values to a text file and reading them back, specifying the encoding to be UTF-8 (on the writer) seemed to have fixed it for me.
I haven't got enough details to know if this is the case here, but a common issue is that the AttributeCompressor does not return a string, but a binary value (which is shown as a string of hexadecimal values in the FME inspector).
If you write the binary value to e.g. a database string field and then read it back, the contents will probably not be the same anymore due to automatic conversion mechanisms in FME, leading the AttributeDecompressor to fail.
You should use the BinaryEncoder / BinaryDecoder to work around this issue.
I wonder if we give a warning in the log file when that happens? I'm checking with the developers. If we don't warn then we should do.
I wonder if we give a warning in the log file when that happens? I'm checking with the developers. If we don't warn then we should do.
Interestingly, there seems to be some cases where FME is implicitely handling the conversion between binary and text without having to use any additional transformers, see the comment from @redgeographics below.
Interestingly, there seems to be some cases where FME is implicitely handling the conversion between binary and text without having to use any additional transformers, see the comment from @redgeographics below.
Yes, sadly I think this is going to be on a writer-by-writer basis. One writer might handle the conversion, especially where the data type isn't really specific (like text) but other writers might fail. One developer view is that the BinaryEncoder is a better choice than the TextEncoder, but just because we aren't sure if the TextEncoder has any unknown limitations.
Thank you for the speedy reply. I had a look at the BinaryEncoder / BinaryDecoder however I am reluctant to use those as a pseudo encryption because they do not provide any security since they are so easy to reverse. Unless I am misunderstanding your suggestion and need to use the BinaryEncoder / BinaryDecoder in conjunction with the AttributeCompressor / decompressor.
My main use is to add very strong encryption to some database fields in a table that contains personal information, then decode it via FME as it is loaded into a cloud based asset management system.
What database are you using? I'd be interested to know if there was a warning message when the data was written.