I was hoping that apache commons or something like that would do the job, but if that's a no-go, we could stuff the method into `MultifactorUtils`.