In addition to the conveyances and securities otherwise allowed by law, all hypothecations and conveyances of ships, steamboats, and other vessels, or parts thereof, made in good faith and for a valuable consideration, shall be valid, and the record thereof, if of vessels of the United States, according to the laws of the United States, or if of a foreign state, according to the laws of such state, shall be notice to all persons.