Created `cipher()` for encrypting session ids

Correcting cipher variables based on `encode`