A code cylinder is a security device in the form of a short cylinder used by the Galactic Empire, which contains information about the wearer. An electronic access keycard, high ranking Imperial officers typically carry multiple code cylinders in special pockets on the front of their uniforms - two pockets just in front of and below the shoulders on each side. In order to use code cylinders they are taken out of the pocket and inserted into a computer to grant access to restricted areas.
- Code cylinders have been present since A New Hope, when Grand Moff Tarkin and other Imperial officers on the Death Star were seen wearing them, though their function was only explained in spinoff books and comics.
- The number of code cylinders carried varied from officer to officer. Generally it seems that more important officers carry more code cylinders: Tarkin had four (two on each side), while General Tagge and Admiral Motti each had only three. In Star Wars Rebels, Tarkin has four cylinders (as in A New Hope), as does Grand Admiral Thrawn, while the lower-ranking Governor Pryce only has two (one on each side). Commandant Cumberlayne Aresko and Taskmaster Myles Grint each only had two code cylinders, one on each side (despite being much lower ranked than Pryce, there are only up to four cylinders for even a Grand Moff). Lieutenant Yogar Lyste, a quite low ranking officer, only has a single code cylinder.
- Curiously, Kallus doesn't have any code cylinders - it's possible that as a member of the Imperial Security Bureau he is supposed to be automatically granted access to any restricted areas from on-site personnel, but in Through Imperial Eyes it is revealed he has a cylinder.
- Maketh Tua didn't have any code cylinders, though this was probably because she was a lower ranking civilian bureaucrat.