Replace a string with its hash value. #1944
-
Hi guys I would like to replace sensitive data in logs by replacing the string in question with its hash value. Example: phone number: +4411223344 should become phone number: 227134d33634fd0c Is there any way to do this with ripgrep? Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, it is not possible and likely never will be. You'll need to use some other tooling to do this. ripgrep is a search tool. It has a |
Beta Was this translation helpful? Give feedback.
No, it is not possible and likely never will be. You'll need to use some other tooling to do this. ripgrep is a search tool. It has a
-r/--replace
flag that permits you to do trivial replacements, but does not let you do a replacement using arbitrary code.