Partly true

But to think that cipher is a slang for cops is not really true. Some rappers call cops "C-Ciphers" (think C-O dropping the P or just for Correction Officers)because they are part of the Nation of Gods & Earths, who have an entire alphabet and language that they use. So that's most likely what you're thinking of.

Anyway the cipher meaning here is circle and it originated in the NGE but moved into the rap world and weed world. Because you got people who freestyle or pass weed in a circle. So it just kinda took on that meaning.