develop C++Cipher
minor fix with write()