That is the exact code Admiral Semmes of the Confederate Ship, Alabama, used.
He bought two identical dictionaries. Random books would be more secure but that would be pretty good.
Yes I knew it had been around a while and used in various films and books as well. I think I heard about it being used in France during the 100 years war as well.... something to add to my list of things to look up again when I get time.