owncloud/core — pull request #12813 by voxsim (2014-12-12 12:52:55+00:00)
Title: Add console command for encryption

I created four console commands for encryption:
* Encrypt
* Decrypt
* Enable Recovery
* Disable Recovery

I don't know the policy for testing the console commands, because right now it's not testable without an owncloud fully installed.

The reason why I created these commands it's because when there are *many* keys I had some timeout issue because every encryption operation is online.

Suppose to have a clean installation with only one user admin with password admin, I will describe each command:

`php occ encryption:encrypt admin admin`

This command will initialize encryption and encrypt the directory of user admin

`php occ encryption:decrypt admin admin`

This command will decrypt the directory of user admin if it's encrypted, otherwise it will do nothing

`php occ encryption:enable-recovery admin admin`

This command will enable the recovery keys for the user admin if only if the recovery password was created before, otherwise it will do nothing.
In practice it will add a new share key for each file related to the recovery.

`php occ encryption:disable-recovery admin admin`

This command will disable the recovery keys for the user admin if only if the recovery password was created before, otherwise it will do nothing.
In practice it will delete a share key for each file related to the recovery.

Let me know if you don't like something,
cheers,
Simon