California Harbors and Navigation Code Section 817
CA Harb & Nav Code § 817 (2017)
The master of a vessel in case of its capture may engage to pay a ransom for it in money or in part of the cargo, and his engagement will bind the vessel, freightage, and cargo.