While it may not be illegal to tell your salary, it is usually not a good idea. Salaries are usually individually negotiated between an employee and an employer or management. As such, there are often wide variations.