mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
example encryption plugin supports key ids
show that two keys can be different if they have different ids or different versions.
This commit is contained in:
@ -21,8 +21,6 @@
|
|||||||
different pages in the same tablespace encrypted with different keys
|
different pages in the same tablespace encrypted with different keys
|
||||||
and what the background re-encryption thread does.
|
and what the background re-encryption thread does.
|
||||||
|
|
||||||
It does not support different key ids, for all ids the key will be the same.
|
|
||||||
|
|
||||||
THIS IS AN EXAMPLE ONLY! ENCRYPTION KEYS ARE HARD-CODED AND *NOT* SECRET!
|
THIS IS AN EXAMPLE ONLY! ENCRYPTION KEYS ARE HARD-CODED AND *NOT* SECRET!
|
||||||
DO NOT USE THIS PLUGIN IN PRODUCTION! EVER!
|
DO NOT USE THIS PLUGIN IN PRODUCTION! EVER!
|
||||||
*/
|
*/
|
||||||
@ -71,7 +69,8 @@ get_key(unsigned int key_id, unsigned int version,
|
|||||||
if (!dstbuf)
|
if (!dstbuf)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
my_md5(dstbuf, (const char*)&version, sizeof(version));
|
my_md5_multi(dstbuf, (const char*)&key_id, sizeof(key_id),
|
||||||
|
(const char*)&version, sizeof(version), NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user