MDL-36580 backup: General support for encrypted contents in backups

- Built using standard backup custom fields.
- Can be applied potentially everywhere.
- Automatically addded 'encrypted' attribute.
- Defaults to site generated key.
- Enforces key robutness / provides authentication (hmac integrity)
- Covered with unit tests.
This commit is contained in:
Eloy Lafuente (stronk7) 2016-06-27 02:32:09 +02:00
parent 9644c0e87a
commit 872e957415
3 changed files with 257 additions and 0 deletions

View file

@ -141,6 +141,15 @@ abstract class backup implements checksumable {
* Usually same than major release zero version, mainly for informative/historic purposes.
*/
const RELEASE = '3.4';
/**
* Cipher to be used in backup and restore operations.
*/
const CIPHER = 'aes-256-cbc';
/**
* Bytes enforced for key, using the cypher above. Restrictive? Yes, but better than unsafe lengths
*/
const CIPHERKEYLEN = 32;
}
/*