mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
9644c0e87a
commit
872e957415
3 changed files with 257 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue