Actions before user credentials

Hi guys, I’ve made a customization by encrypting the password entered by the user (by extending UsernamePasswordForm), but now I want to add a random salt previous to the encryption action, so… in which point could I add the salt generation? I tried with Required Actions, but those are executed after the credentials authentication, and I need it before.
Thanks in advance.