@Stefano Figini we do not support acessing database credentials through the FastDatamasker custom function framework. If you are looking to mask values, even if they reference other columns values you should be good using our existing frameowk and build your custom function java to do it.
If you can give me more details into what you are trying to do we can validate if its possible that way or not.
Thanks,