Is it possible to define a pattern so that the decryption is going to an endpoint in charge of returning the decrypted value?

Example

APP: KEY: '{rest-cipher}value-to-decript'

And that with that pattern it identifies all the properties that start with that and execute a function that does the decryption?