הוספת SSO לאחר שכבר נרשמו משתמשים רבים -- כיצד להעביר אותם?

This is a built in function.

$hash = hash_pbkdf2('sha256', 'YourPassword', 'YourSalt', 64000, 64, false);

Typically hash algorithms operate on binary data and the result is hex- or Base64-encoded upon output. So that’s not an issue.