Added encryption.
Not tested yet and quite inefficient.