Any person or persons who willfully or maliciously injure, damage, or destroy, or attempt to injure, damage, or destroy, any dam or other work erected under the provisions of this chapter for restraining, impounding, or settling purposes, or for use in connection therewith, shall be guilty of a misdemeanor, and upon conviction thereof shall be fined not to exceed the sum of $5,000 or be imprisoned not to exceed five years, or by both such fine and imprisonment, in the discretion of the court. And any person or persons, company or corporation, their agents or employees, who shall mine by the hydraulic process directly or indirectly injuring the navigable waters of the United States, in violation of the provisions of this chapter shall be guilty of a misdemeanor, and upon conviction thereof shall be punished by a fine not exceeding $5,000, or by imprisonment not exceeding one year, or by both such fine and imprisonment, in the discretion of the court.