Customizing regenerate client secret

Hi, I want to customize the regenerate client secret. I found that it is a REST API and not an SPI. Can I override this functionality?