Exemplo n.º 1
0
        //--------------------
        // Funcion para hacer el hash con la contraseña y el id
        //--------------------
        public static string Hasheo(string password, string id)
        {
            byte[] salt2byte;
            salt2byte = UTF8Encoding.UTF8.GetBytes(id + id + id + id + id + id + id + id + id);
            var pbkdf2 = new Rfc2898DeriveBytes(password, salt2byte, 10000);

            byte[] hash2      = pbkdf2.GetBytes(32);
            String HashString = Convertir.hash(hash2);

            return(HashString);
        }