Code cracked for 400-year-old shipwreck padlock