La carta estaba escrita en cifra.

English Translation

The letter was written in code.

cifra is cipher, it’s ridiculous. There’s a difference between code and cipher.

Cipher: Encodes messages using mathematical algorithms. Code: Represents words, phrases, or sentences with agreed symbols or signals.