basic cipher working