josacar / triki

Mysql, PostgreSQL and SQL dump obfuscator aka anonimizer
MIT License
38 stars 4 forks source link

Ask: Revert back from obfuscation state(with modified data) to original state without obfuscation (with new/modified data) #18

Closed brm-ryd closed 9 months ago

brm-ryd commented 10 months ago

Hi Sorry, to asking this through here,

do you think there's a way to revert the dump data back to original (non obfuscation variables) with some new data after there are some new / modified data in obfuscation state db ?

Thank you

josacar commented 10 months ago

the process just generates a masked dump, you can choose to mask data via random, hashed ( cannot get original, i.e. SHA-512 ) or kinda encrypted ( can get original, i.e. AES ).

The import process just drops tables to start from a pristine state.

If you want to take back the masked database with new data back to the system, you need to implement a symmetric masking method ( i.e. encryption ) and then implement the reverse process.

In a crystal lambda, you can implement it and have the masking/unmasking, and when unmasking checking if the data is masked or not.