How was the code and operating rules of the corsairs of the Mediterranean used, such as by Barbary Corsairs or Knights of the Order, during Middle Ages?
There are references to agreements in the Mediterranean for privateering, and also agreements in between the corsairs to agree on the distribution of income from loots and slavery.
One example is in the book "The Mediterranean and the Mediterranean World in the Age of Philip II" by Fernand Braudel, in which the following is stated: "... in the Mediterranean, the words piracy and pirates were hardly in it's current usage before 17th century... Privateering is legitimate war, authorized either by formal declaration of war or by letters of marque, passports, commissions or instructions. Privateering had it's own laws, rules, living customs and traditions." (page 866)
Also, in the Wikipedia Article on Pirate Codes states, the following is stated: "privateering articles can be traced back to Europe in the Middle Ages when there was a system of 'joint hands' agreements between merchants, owners and seamen to share profits."
There are many references to some sort of operating regulations by the corsairs in the Mediterranean, however I couldn't reach any details on what these were, how detailed and formal (or informal) they were, and if these were the similarly used in between opposite groups such as the Knights of the Order and the Barbary Corsairs?