sql >> Base de Datos >  >> RDS >> Oracle

Obtener diferentes resultados de cifrado entre C#.Net y Oracle

usas una codificación incorrecta. prueba el siguiente código:

string salt = "123";
System.Security.Cryptography.SHA1 sha = System.Security.Cryptography.SHA1.Create();
byte[] preHash = System.Text.Encoding.UTF8.GetBytes(salt);
byte[] hash = sha.ComputeHash(preHash);

string password = System.Convert.ToBase64String(hash);
password = password.Substring(0, 8);