Yes. As well as most ships were equip with a code book which was meant to be thrown overboard in the event of capture. Sometimes, that was unable to be done, so it was imperative to change it often.
As much as we were able to, at least. I'm afraid that proper wound sterilization techniques were not fully known until several years after my dreams.