I have a ruby client program that encrypts a password with string#crypt like so
encrypted = password.crypt(SALT)
# removing first two characters which actually are the salt for safety
return encrypted[2, encrypted.size - 2]
it then sends it to a server for comparison with it's stored pre-encrypted string. how ever I need to be able to send the same encrypted password form a c# app and a php web page and still be able to log in with the same password from any of the other clients.
what would be the equivalent code in C# and php for the encryption?