Encryption
Klub can encrypt provider data stored on the user field, and you can optionally encrypt entire user content files. Use this page when you need encryption at rest.
Encrypt provider data
<?php
return [
'bnomei.klub.crypto.encrypt' => true,
'bnomei.klub.crypto.password' => fn() => env('CRYPTO_PASSWORD'),
];
If you lose the encryption password, the data cannot be recovered.
Encrypt full user content files
Use the HasEncryptedContent trait on a custom user model to encrypt the entire content file.
<?php
class MemberModel extends \Kirby\Cms\User
{
use \Bnomei\Klub\HasEncryptedContent;
}
Kirby::plugin('bnomei/klub-encryption', [
'userModels' => [
'member' => MemberModel::class,
],
]);