Added client-side encryption for documents

Currently have an issue with initializing the key.