rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
329 stars 189 forks source link

How can we make salted md5, sha 256 or sha 512, compatible with CASino's ActiveRecord? #198

Closed adrianogoncalves closed 3 years ago

adrianogoncalves commented 4 years ago

After weeks trying it, I couldn't find a way. Could you show, please, any direction, including an encrypted password example?

Thanks in advance!

adrianogoncalves commented 4 years ago

Just found a way! In PHP:

$senhaSha512 = password_hash('mypass', PASSWORD_BCRYPT);
$senhaSha512{2} = 'a'; # change the 'y', in the beginning, to 'a'
echo $senhaSha512;